get reference to the element that calls slides()

97 views
Skip to first unread message

Panos Laganakos

unread,
Jun 2, 2012, 7:40:22 AM6/2/12
to slid...@googlegroups.com
Is there a way to get reference to the element that calls the slides()?

ie:

$('#my_slideshow).slides({
    animationStart: function() {
        <reference_to_myslideshow>.something();
    }
});

Jens Aceman

unread,
Jun 11, 2012, 7:12:05 AM6/11/12
to slid...@googlegroups.com
I had the same problem. You need to modify the script source.

Replace every occurence of 
option.animationStart(current + 1);
with
option.animationStart(current + 1,elem);

and 
option.animationComplete(next + 1,elem);
with
option.animationComplete(next + 1,elem);

then use this code:
$('#my_slideshow).slides({
    animationStart: function(current,element) {
        element.something();
    }
}); 
Reply all
Reply to author
Forward
0 new messages