Vanilla 2
Discussions
Activity
Sign In
prettyPhoto support
How do I pass a reference to the selected photo to a changepicturecallback?
pdreyn
June 2015
The function replaceTitleWithDetails() below needs to grab the contents of a div that is a sibling of the
element that the user has clicked on. Is there a way to set up the callback reference for each node in the script below? If not, how do I detect what the user had clicked on when replaceTitleWithDetails fires?
jQuery("a[rel^='prettyPhoto']").prettyPhoto({
overlay_gallery: false,
social_tools: '',
deeplinking: false,
default_width: 500,
horizontal_padding: 0,
opacity:".5",
keyboard_shortcuts: false,
show_title: false,
changepicturecallback:function(){replaceTitleWithDetails();}
});
pdreyn
June 2015
Resolved. While 'this" returns window in the context of replaceTitleWithDetails(), "theRel" is available as attribute
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
4,649
General
1,277
Showoff your stuff!
13
prettyComments support
18
prettySociable support
40
WP-prettyphoto support
290
prettyCheckboxes support
19
prettyGallery support
118
prettyMobile support
12
prettyPhoto support
2,833
prettyLoader support
16
INK - Support forum
13
Powered by Vanilla