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

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -