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.
68 lines
2.1 KiB
68 lines
2.1 KiB
|
|
//banner
|
|
$(function(){
|
|
let url = window.location.href;
|
|
if(url.split('?').length!=0&&url.split('?')[1]){
|
|
$(`.section${url.split('?')[1].slice(3)}`).addClass('active');
|
|
console.log(url.split('?')[1].slice(3))
|
|
// $('header').css('display','none !important')
|
|
$("#header").css('display','none')
|
|
}
|
|
|
|
$('#header').load('../public/header1.html',function(){
|
|
|
|
$('.header').addClass('on');
|
|
if(url.split('?').length!=0&&url.split('?')[1]){
|
|
$('.header').css('display','none')
|
|
}
|
|
})
|
|
//移动端展开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');
|
|
});
|
|
//全屏滚动
|
|
$('#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){
|
|
|
|
if(index==1){
|
|
$("#header").css('display','block');
|
|
$('header').css('display','flex');
|
|
$('header').addClass('on').addClass("animation");
|
|
}else{
|
|
// $("#header").css('display','none');
|
|
$('header').css('display','none')
|
|
}
|
|
},
|
|
afterSlideLoad:function(){
|
|
},
|
|
afterRender: function(){
|
|
},
|
|
onLeave: function(index, direction){
|
|
$(".header").removeClass("animation");
|
|
}
|
|
})
|
|
$('.zhuanbeiItem').on('mouseenter',function(){
|
|
$(this).children('.imgcontent').children('img').addClass('activeimg')
|
|
$(this).siblings().children('.imgcontent').children('img').removeClass('activeimg')
|
|
})
|
|
}) |