Saturday 15 August 2015

jquery - setInterval(function() and updateVars() for many carousels -



jquery - setInterval(function() and updateVars() for many carousels -

currently have next in $(document).ready(function() after initialization sliders themselves.

this code represents 3 sliders , works, have more sliders.

when add together more 4-5+ sliders doesn't work (it works on some, not others)

is there way add together bunch of sliders here?

setinterval(function(){ var owldatats = $(".testimonial-slider").data('owlcarousel'); owldatats.updatevars(); var owldatams = $(".multi-slider").data('owlcarousel'); owldatams.updatevars(); var owldatamm = $(".mini-multi").data('owlcarousel'); owldatamm.updatevars(); },1500);

btw: used when page size changes without re-size of viewport, toggling sidebar or tab content.

you can give mutual class sliders , do:

setinterval(function(){ $(".common-class").each(function(){ $(this).data('owlcarousel').updatevars(); }); },1500);

jquery owl-carousel

No comments:

Post a Comment