Hello. Here I am making a site http://maxicom.mnogomesta.ru/ (a site on joomla 2.5), pay attention to the "leaving blocks to the right" of the online application. If you quickly move the mouse over them, the animation loops and can jump 5-10 times back and forth. Everything is done on the basis of 2 jQuery methods of version 1.7.1, the hover(over,out) method hover(over,out) and the animate() method. Here is the code

 jQuery("#apply-to").hover( function () { jQuery("#apply-to").animate({right:"0px"},700)} , function () {jQuery("#apply-to").animate({right:"-600px"},700)} ); 

I simply change the positioning of the Div in which the whole form is located when hovering and "leaving" the mouse cursor from the Div . I do not think how to stop looping. The problem is right there, if you for example remember a form field and instead of entering a value you select this value from the drop-down list of memorized values, the focus from the Div is lost and it works out the hover() method. Have anyone sound thoughts - share. Immediately I will say click() not to offer, because the customer wants precisely on targeting, the chronoforms component does not work here either, it conflicts with the scripts. Thank you in advance!

  • 3
    Need to explain to the customer that this is called "zadrot"! Let him try to fill out the form and not take the mouse away from the borders of this window))) After that he will say - onclick i love you! - Palmervan

1 answer 1

 jQuery("#apply-to").hover( function () { jQuery("#apply-to").stop().animate({right:"0px"},700)} , function () {jQuery("#apply-to").stop().animate({right:"-600px"},700)} ); 

And the rest of @Palmervan is right.