Posted By

LukeLux on 02/14/11


Tagged

textmate


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

maltem


Sliding Content - About


 / Published in: Other
 

  1.  
  2. // Sliding About content
  3. var currentPosition = 0;
  4. var slideWidth = 340; // content width
  5. // Show hidden box
  6. $('#aboutBox') // id/class of content
  7. .css({
  8. 'overflow': 'hidden',
  9. 'left' : -slideWidth + 'px',
  10. 'display' : 'none'
  11. })
  12. // Animate show/hidden cotent box
  13. .find('a.close').bind('click', function(){
  14. $('#aboutBox')
  15. .animate({
  16. 'left': -slideWidth + 'px',
  17. }, 500, function(){
  18. $(this).css('display', 'none');
  19. });
  20. return false;
  21. });
  22. $('.extras li a').bind('click', function() {
  23.  
  24. $('#aboutBox')
  25. .css('display', 'block')
  26. .animate({
  27. 'left': 0,
  28. });
  29. return false;
  30. });

Report this snippet  

You need to login to post a comment.