Didn't have "killer carrousel" topics in choice menu...
There is no specific event for that, but there is the getFrontItemIndex() API call.
See it working here: http://starplugins.local/killercarousel/examples/api
The example on that page displays the item index number when the carousel changes, similar to what you want to do.
You can use the getItemElement(itemIndex) to get the actual item element so you can pull out text from the alt attribute.
Also, there is a CSS class applied to the front item (.kc-front-item) which may also be useful.
Probably clearer if I show you some code...
(do this after creating the carousel).
// Get carousel instance
kc = $('.kc-wrap').data('KillerCarousel');
// Check every 1/10 second.
setInterval( function(){
// Get front item index.
var idx = kc.getFrontItemIndex();
// Get item element.
$element = kc.getItemElement(idx);
// Do something with $element here...
}, 100)
Thanks, will look this way...
By the way, did you received my license request ? (sended beginning of last week, if my memory is good)
Kaiser Christophe
Hi!
looking about this plugin for a drupal website, i'm asking myself about how to have a event-trigger each time the front item change.
Tryed to use :
But this one doesn't work when mousewheel is used. (no refresh except with mousemove or click)
Is there an event handler for that precise case?
Thx
1 person likes this idea