Guest User

Untitled

a guest
Dec 13th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. // Slideout JavaScript Document
  2.  
  3. jQuery(document).ready(function() {
  4.  
  5. // Hide the Slide Out
  6. jQuery('.slide_out_content').css({display: 'none'});
  7. // Put hand there for hover
  8. jQuery('.slide_out_normal').css({
  9. cursor: 'pointer',
  10. });
  11.  
  12.  
  13. // On click event
  14. jQuery('.slide_out_normal').each(function()
  15. {
  16. jQuery(this).click(function()
  17. {
  18. var target = jQuery(this).parent().find('.slide_out_content');
  19. var backgroundpos = jQuery('.up-down',this).css('background-position');
  20. var t = this;
  21. jQuery(target).animate({height: 'toggle'},
  22. 350,
  23. function()
  24. {
  25. if (backgroundpos == '-24px 0px')
  26. {
  27. jQuery(t).find('.up-down').css('background-position', '0px');
  28. jQuery('.slide_out_normal').css('background-position', '100% 0');
  29. }
  30. else
  31. {
  32. jQuery(t).find('.up-down').css('background-position', '-24px 0px');
  33. jQuery('.slide_out_normal').css('background-position', '0px');
  34. }
  35.  
  36.  
  37. });
  38. });
  39. });
  40.  
  41.  
  42. // Close Doc Ready
  43. });
Add Comment
Please, Sign In to add comment