Jquery looping on hover
Jquery looping on hover
I've using JQuery to incorporate two simultaneous effects; slideToggle and fadeOut, on hover. Both effects work as desired, except that they both loop when hovering over the active div. Here's the code:
-
$(document).ready(function(){
$("#oneform-off").hover(function(){
$("#oneform-on").slideToggle("slow");
$("#oneform-off").fadeOut("slow");
}, function(){
$("#oneform-on").slideToggle("slow");
$("#oneform-off").fadeIn("slow");
});
What do I need to do to ensure that the second function only works on mouseout?
Thanks!
