jquery animation fixed position -


bellow code contact form expands user clicks it

$(document).bind('click',             function() { $('div#contactable_inner').animate({"marginleft": "-=387px"}, "slow")             }); 

for each click, element moves -387px. want move -387px 1st click. next clicks, should not animate.

$(document).one('click',             function() { $('div#contactable_inner').animate({"marginleft": "-=387px"}, "slow")             }); 

.one() fires 1 time.

read .one()


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - EclipseLink JPA Object is not a known entity type -

java - Need to add SOAP security token -