[jQuery] Re: Animate function. Once I animate how do I er.... de... animate

2008-02-14 Thread somedude
this worked great, thanks! On Feb 13, 5:08 pm, J Moore <[EMAIL PROTECTED]> wrote: > um, use a variable? > > var x = true; > $("#container").click(function() { > if (x) { > $("#container").animate({"marginTop": "-=237px"}, "slow"); > } else { > $("#container").anima

[jQuery] Re: Animate function. Once I animate how do I er.... de... animate

2008-02-14 Thread andrea varnier
there's a toggle() method, too, that toggles between two functions. like this: $("#container").toggle(function() { $("#container").animate({"marginTop": "-300px"}, "slow"); }, function() { $("#container").animate({"marginTop": "300px"}, "slow"); }); :)

[jQuery] Re: Animate function. Once I animate how do I er.... de... animate

2008-02-13 Thread J Moore
um, use a variable? var x = true; $("#container").click(function() { if (x) { $("#container").animate({"marginTop": "-=237px"}, "slow"); } else { $("#container").animate({"marginTop": "400px"}, "slow"); } x = !x; }); On Feb 13, 3:05 pm, somedude <