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); });        
Comments
Post a Comment