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
Post a Comment