javascript - Perform multiple clicks as long as user is hovering over an element in jQuery -


i have following jquery. once hover on next or previous arrows, clicks on them, making slider move. need modify code, keeps clicking long hovering, right now, once.

$( "#slider .next, #slider .prev" ).hover(     function() {         $(this).click();     },      function() {} ); 

the slider uses jquery plugin called tiny carousel

thanks

this trigger click on elements every second:

var clr; $(".next, .prev").hover(function (e) {     clr = setinterval(function () {         $(e.target).click();     }, 1000) }, function () {     clearinterval(clr); }); 

jsfiddle example


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -