Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
- <script src="//static.tumblr.com/gtjt4bo/QRmphdsdv/glenplayer02.js"></script>
- <script>
- $(document).ready(function() {
- $('.tabs .tab-links a').on('click', function(e) {
- var currentAttrValue = $(this).attr('href');
- // Show/Hide Tabs
- $('.tabs ' + currentAttrValue).fadeIn(600).siblings().hide();
- // Change/remove current tab to active
- $(this).parent('li').addClass('active').siblings().removeClass('active');
- e.preventDefault();
- });
- });
- </script>
- <script>
- $(document).ready(function() {
- $('#filterOptions li a').click(function() {
- // fetch the class of the clicked item
- var ourClass = $(this).attr('class');
- // reset the active class on all the buttons
- $('#filterOptions li').removeClass('active');
- // update the active state on our clicked button
- $(this).parent().addClass('active');
- if(ourClass == 'all') {
- // show all our items
- $('#ourHolder').children('div.item').show();
- }
- else {
- // hide all elements that don't share ourClass
- $('#ourHolder').children('div:not(.' + ourClass + ')').hide();
- // show all elements that do share ourClass
- $('#ourHolder').children('div.' + ourClass).show();
- }
- return false;
- });
- });
- </script>
- <link href="https://fonts.googleapis.com/css?family=Work+Sans" rel="stylesheet">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement