I’m following this example in:
http://bxslider.com/examples/perform-action-transition-callback
But with this example I can get the index number from current image.
I have this code:
$('#preview_images_gallery').bxSlider({
onAfterSlide: function(totalSlides, currentSlide){
var src = $('currentSlide').attr('src');
$('.preview .bx-wrapper .bx-window').append('<p class="check">' + src);
}
});
How can I get the src attribute of current image?
I write:
var src = $(currentSlide).attr('src');
but I get undefined!
Thank you!
Not tested, and not very efficient, but something like this might work, may need some tweaking.
If macros is correct, it would be: