Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function($) {
- var $Filter = $('#filters');
- var FilterTimeOut;
- $Filter.find('ul li:first').addClass('active');
- $Filter.find('ul li:not(.active)').hide();
- $Filter.hover(function(){
- clearTimeout(FilterTimeOut);
- if( $(window).width() < 959 )
- {
- return;
- }
- FilterTimeOut=setTimeout(function(){ $Filter.find('ul li:not(.active)').stop(true, true).animate({width: 'show' }, 250, 'swing'); }, 100);
- },function(){
- if( $(window).width() < 959 )
- {
- return;
- }
- clearTimeout(FilterTimeOut);
- FilterTimeOut=setTimeout(function(){ $Filter.find('ul li:not(.active)').stop(true, true).animate({width: 'hide' }, 250, 'swing'); }, 100);
- });
- $(window).resize(function() {
- if( $(window).width() < 959 )
- {
- $Filter.find('ul li:not(.active)').show();
- }
- else
- {
- $Filter.find('ul li:not(.active)').hide();
- }
- });
- $(window).resize();
- $Filter.find('a').click(function(){
- $Filter.find('ul li').not($(this)).removeClass('active');
- $(this).parent('li').addClass('active');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement