Last active
October 4, 2018 07:53
-
-
Save Tusko/278a7dcd5a4ad2867482 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom JS | |
var catConfig = { | |
hideControlOnEnd: true, | |
adaptiveHeight: true, | |
infiniteLoop: false, | |
useCSS: false, | |
prevText: '', | |
nextText: '', | |
pager: false, | |
speed: 350 | |
}, | |
tabsliders = []; | |
$('#catalog .slides > div').each(function(i, slider) { | |
tabsliders[i] = $(slider).bxSlider(catConfig); | |
}); | |
$('#catalog nav a').click(function() { | |
var sl = $('#catalog .cat-wrap'); | |
if(!$(this).hasClass('cat-active')) { | |
sl.height(sl.height()); | |
$('#catalog nav a').removeClass('cat-active'); | |
$(this).addClass('cat-active'); | |
$('#catalog .slides').hide().eq($(this).index()).fadeIn(350, function(){ | |
sl.removeAttr('style'); | |
}); | |
$.each(tabsliders, function(i, slider) { | |
slider.reloadSlider(catConfig); | |
}); | |
window.location.hash = $(this).attr('href'); | |
} | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment