javascript - Need to select current slide from Slider and put a thumbnail into a user field -


i'm newbie. i've tried crazy research , can't figure out i'm doing wrong. in wordpress, trying use revolution slider sort of gallery user can select current focused slide , javascript attach thumbnail image correlates particular slide user's form field (just wordpress media uploader do). can javascript have img src file change onclick event. need current slide in order determine thumbnail load. can't seem current slide properly. gets first slide only. here code have that:

// listen when slider loads revapi2.bind('revolution.slide.onloaded', function() {  // listen when new slide shown revapi2.bind('revolution.slide.onchange', function(e, data) {     // current slide number     var currentslide = revapi2.revcurrentslide();      localstorage.setitem("revnum", currentslide);     }); }); 

when change slides in slider, nothing else happens currentslide - stays on #1. no errors.

the reason i'm storing local storage because have pass iframe main page.

thanks help.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -