Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1.  
  2. // Share Buttons
  3. //----------------------------------------//
  4.  
  5. $('.share-buttons').each(function() {
  6.  
  7. var $Filter = $(this);
  8. var FilterTimeOut;
  9. $Filter.find('ul li:first').addClass('active');
  10. $Filter.find('ul li:not(.active)').hide();
  11.  
  12. $Filter.hover(function(){
  13. clearTimeout(FilterTimeOut);
  14. if( $(window).width() < 959 )
  15. {
  16. return;
  17. }
  18. FilterTimeOut=setTimeout(function(){
  19. $Filter.find('ul li:not(.active)').stop(true, true).animate({width: 'show' }, 250, 'swing');
  20. $Filter.find('ul li:first-child a').addClass('share-hovered');
  21. }, 100);
  22.  
  23. },function(){
  24. if( $(window).width() < 960 )
  25. {
  26. return;
  27. }
  28. clearTimeout(FilterTimeOut);
  29. FilterTimeOut=setTimeout(function(){
  30. $Filter.find('ul li:not(.active)').stop(true, true).animate({width: 'hide'}, 250, 'swing');
  31. $Filter.find('ul li:first-child a').removeClass('share-hovered');
  32.  
  33. }, 250);
  34. });
  35. $(window).resize(function() {
  36. if( $(window).width() < 960 )
  37. {
  38. $Filter.find('ul li:not(.active)').show();
  39. }
  40. else
  41. {
  42. $Filter.find('ul li:not(.active)').hide();
  43. }
  44. });
  45. $(window).resize();
  46.  
  47. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement