javascript - Backstretch copy output from loop to a DIV -


i have full screen background slideshow powered backstretch script. i'm trying create caption each slide , display information in

<span class="cap"></span> 

inside of

<div class="caption"></div> 

the span part of list populates slideshow , hidden.

here jsfiddle of have far.

http://jsfiddle.net/g84hk/7/

thanks advice or help.

you can use backstretch.show event suggest in fiddle cap element array.

backstretch fire "backstretch.show" event everytime new image loads, triggering function passed event , backstetch instance. if listen event, can, example, coordinate other changes coincide slideshow.

code:

// coordinating image captions slides $(b).on('backstretch.show', function() {     $(this).data("backstretch").index;     $(".caption").html(cap[$(this).data("backstretch").index].html()); }); 

here working fiddle: http://jsfiddle.net/g84hk/9/


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -