clearTimeout on Mouse Exit
问题 I have a timer setup like so: var timerID; $this.hover(function(){ $this.find('.stage_obj').each(function(index){ var current_obj = $(this); timerID = setTimeout(function(){ animate_on_top(current_obj, index);}, parseInt(OS.delay_y_on_set[index],10)); }); }, function(){ clearTimeout(timerID); }); There are functions to control the animation in/out on hover. The timers are acting as delays (.delay won't work in my situation). Everything works fine, except the timer isn't cancelled on mouse