You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.1 KiB
85 lines
2.1 KiB
|
|
//banner
|
|
$(function(){
|
|
var owl = $('.brand__slider');
|
|
$('.brand__slider').owlCarousel({
|
|
loop:true,
|
|
margin:30,
|
|
autoplay:true,
|
|
autoplayTimeout:1000,
|
|
smartSpeed:500,
|
|
items:3,
|
|
navText:['<img src="../images/arrowleft.png" alt="">','<img src="../images/arrowright.png" alt="">'],
|
|
nav:true,
|
|
dots:false,
|
|
responsive:{
|
|
0:{
|
|
items:1
|
|
},
|
|
576:{
|
|
items:2
|
|
},
|
|
767:{
|
|
items:3
|
|
},
|
|
}
|
|
});
|
|
$('.category__item').on('mouseover',function(){
|
|
owl.trigger('stop.owl.autoplay')
|
|
})
|
|
$('.category__item').on('mouseleave',function(){
|
|
owl.trigger('play.owl.autoplay',[1000])
|
|
|
|
})
|
|
|
|
$("#header").load("../public/header1.html","",function(){
|
|
$('.header').addClass('on');
|
|
|
|
//移动端展开nav
|
|
$('#navToggle').on('click',function(){
|
|
$('.m_nav').addClass('open');
|
|
})
|
|
//关闭nav
|
|
$('.m_nav .top .closed').on('click',function(){
|
|
$('.m_nav').removeClass('open');
|
|
})
|
|
//二级导航 移动端
|
|
$(".m_nav .ul li").click(function() {
|
|
$(this).children("div.dropdown_menu").slideToggle('slow')
|
|
$(this).siblings('li').children('.dropdown_menu').slideUp('slow');
|
|
});
|
|
|
|
|
|
});
|
|
$("#footer").load("../public/footer.html");
|
|
|
|
//全屏滚动
|
|
$('#about_main').fullpage({
|
|
'navigation': true,
|
|
scrollBar: false,
|
|
slidesNavigation: true,
|
|
css3: true,
|
|
controlArrows: false,
|
|
continuousHorizontal:true,
|
|
scrollingSpeed:500,
|
|
showActiveTooltip :true,
|
|
anchors: ['hero', 'one', 'two', 'three','four','five'],
|
|
loopHorizontal: true,
|
|
afterLoad: function(anchorLink, index){
|
|
console.log(index)
|
|
$('header').addClass('on').addClass("animation");
|
|
if(index==1){
|
|
$('header').css('display','flex')
|
|
}else{
|
|
$('header').css('display','none')
|
|
}
|
|
},
|
|
afterSlideLoad:function(){
|
|
},
|
|
afterRender: function(){
|
|
},
|
|
onLeave: function(index, direction){
|
|
$(".header").removeClass("animation");
|
|
}
|
|
})
|
|
}) |