[jQuery] Toggle Animation?

2008-12-23 Thread Nathan
I'm relatively new to jquery, and i'm trying to find a way to toggle a simple animation? At the moment I have this, which moves a div 400px to the left upon clicking a link. Pretty straight forward. $(document).ready(function(){ $(.slide).click(function () {

[jQuery] toggle() animation - maybe there is a neater way to do this?

2008-03-07 Thread jquertil
I have this code shown below - it works fine but I imagine there is a neater way to accomplish this... anyone? I would love to somehow shrink this to less lines of code. stoggle = 0; $(#button).).click(function(){ var extra = 150; if(stoggle==0){