Posted By

lynseydesign on 11/18/10


Tagged


Versions (?)

Custom 3 slide


 / Published in: jQuery
 

For sliding a div area between 3 areas on click.

  1. jQuery('a.waters').click(function(){
  2. jQuery('ul.profiles').addClass('waters').removeClass('pettit');
  3. jQuery(this).parent().addClass('active');
  4. jQuery('a.pettit').parent().removeClass('active');
  5. jQuery('div#slide ul.slider').animate({"top":"300px"}, "slow");
  6. });
  7.  
  8. jQuery('a.pettit').click(function(){
  9. jQuery('ul.profiles').addClass('pettit').removeClass('waters');
  10. jQuery(this).parent().addClass('active');
  11. jQuery('a.waters').parent().removeClass('active');
  12. jQuery('div#slide ul.slider').animate({"top":"-300px"}, "slow");
  13. });
  14. jQuery('a.back').click(function(){
  15. jQuery('ul.profiles').removeClass('pettit').removeClass('waters');
  16. jQuery('a.pettit').parent().removeClass('active');
  17. jQuery('a.waters').parent().removeClass('active');
  18. jQuery('div#slide ul.slider').animate({"top":"0"}, "slow");
  19. });

Report this snippet  

You need to login to post a comment.