Advertisement
Demi-monde

hawkescriptsection

Aug 27th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
  2. <script src="//static.tumblr.com/gtjt4bo/QRmphdsdv/glenplayer02.js"></script>
  3.  
  4. <script>
  5. $(document).ready(function() {
  6. $('.tabs .tab-links a').on('click', function(e) {
  7. var currentAttrValue = $(this).attr('href');
  8.  
  9. // Show/Hide Tabs
  10. $('.tabs ' + currentAttrValue).fadeIn(600).siblings().hide();
  11.  
  12. // Change/remove current tab to active
  13. $(this).parent('li').addClass('active').siblings().removeClass('active');
  14.  
  15. e.preventDefault();
  16. });
  17. });
  18. </script>
  19.  
  20. <script>
  21. $(document).ready(function() {
  22. $('#filterOptions li a').click(function() {
  23. // fetch the class of the clicked item
  24. var ourClass = $(this).attr('class');
  25.  
  26. // reset the active class on all the buttons
  27. $('#filterOptions li').removeClass('active');
  28. // update the active state on our clicked button
  29. $(this).parent().addClass('active');
  30.  
  31. if(ourClass == 'all') {
  32. // show all our items
  33. $('#ourHolder').children('div.item').show();
  34. }
  35. else {
  36. // hide all elements that don't share ourClass
  37. $('#ourHolder').children('div:not(.' + ourClass + ')').hide();
  38. // show all elements that do share ourClass
  39. $('#ourHolder').children('div.' + ourClass).show();
  40. }
  41. return false;
  42. });
  43. });
  44. </script>
  45.  
  46. <link href="https://fonts.googleapis.com/css?family=Work+Sans" rel="stylesheet">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement