Advertisement
Guest User

Untitled

a guest
Oct 10th, 2013
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     jQuery(document).ready(function($) {
  2.         var $Filter = $('#filters');
  3.         var FilterTimeOut;
  4.         $Filter.find('ul li:first').addClass('active');
  5.         $Filter.find('ul li:not(.active)').hide();
  6.         $Filter.hover(function(){
  7.             clearTimeout(FilterTimeOut);
  8.             if( $(window).width() < 959 )
  9.             {
  10.                 return;
  11.             }
  12.             FilterTimeOut=setTimeout(function(){ $Filter.find('ul li:not(.active)').stop(true, true).animate({width: 'show' }, 250, 'swing'); }, 100);
  13.         },function(){
  14.             if( $(window).width() < 959 )
  15.             {
  16.                 return;
  17.             }
  18.             clearTimeout(FilterTimeOut);
  19.             FilterTimeOut=setTimeout(function(){ $Filter.find('ul li:not(.active)').stop(true, true).animate({width: 'hide' }, 250, 'swing'); }, 100);
  20.         });
  21.         $(window).resize(function() {
  22.             if( $(window).width() < 959 )
  23.             {
  24.                 $Filter.find('ul li:not(.active)').show();
  25.             }
  26.             else
  27.             {
  28.                 $Filter.find('ul li:not(.active)').hide();
  29.             }
  30.         });
  31.         $(window).resize();
  32.         $Filter.find('a').click(function(){
  33.             $Filter.find('ul li').not($(this)).removeClass('active');
  34.             $(this).parent('li').addClass('active');
  35.         });
  36.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement