Posted By

Some0ne on 06/22/11


Tagged

jquery


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Bambo
spee66


jQuery toggle animate


 / Published in: jQuery
 

Just leaving this here for my own reference ;)

  1. $(document).ready(function(){
  2.  
  3. $('#clickme').toggle(
  4. function(){
  5. $('#animateme').animate({marginLeft: "250"}, 1000);
  6. },
  7. function(){
  8. $('#animateme').animate({marginLeft: "0"}, 1000);
  9. });
  10. });

Report this snippet  

You need to login to post a comment.