Problem
I had “undefined” showing up in the description of my lightbox whenever I left out the “title” attribute in my link.
Solution
I am using jQuery 1.6.2, the examples used 1.4.2. To resolve the problem, look to change something like this:
if(pp_descriptions[set_position] != ""){ $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); }else{ $pp_pic_holder.find('.pp_description').hide(); }
to this:
if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){ $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); }else{ $pp_pic_holder.find('.pp_description').hide(); }
search terms used: prettyphoto undefined description
source: http://forums.no-margin-for-errors.com/discussion/1915/when-there-is-no-title-element-displays-undefined/#Item_3