<script> | |
initBanner(); | |
openDemoDropdown(); | |
function initBanner() { | |
$('.banner-nav li').click(function () { | |
var index = $(this).index(); | |
$(this).addClass('active').siblings().removeClass('active'); | |
$('.banner-wrapper .img-item').eq(index).fadeIn().siblings().fadeOut(); | |
}); | |
} | |
function openDemoDropdown() { | |
if (location.hash === '#demo') { | |
$('.btn-demo').trigger('click') | |
} | |
} | |
</script> |