$('.navbtns').click(function () {
$('body').toggleClass('navShow');
})
$('.headerMenu').click(function () {
$('.Nav').slideDown()
})
$('.close').click(function () {
$('.Nav').slideUp()
})
// $('.navBox ul li ').mouseenter(function () {
// $(this).find('.navCenter').stop().slideDown();
// })
// $('.navBox ul li ').mouseleave(function () {
// $(this).find('.navCenter').stop().slideUp();
// })
$('.navBox ul li').click(function () {
$(this).find('.navCenter').slideToggle();
$(this).siblings().find('.navCenter').slideUp();
// return false;
})
$('.tmenu').click(function () {
$('.pop').slideDown()
})
$('.pop_ico').click(function () {
$('.pop').slideUp()
})
function dropMenu(obj){
$(obj).each(function(){
var theSpan = $(this);
var theMenu = theSpan.find(".submenu");
var tarHeight = theMenu.height();
theMenu.css({height:0,opacity:0});
var t1;
function expand() {
clearTimeout(t1);
theSpan.find('a').addClass("selected");
theMenu.stop().show().animate({height:tarHeight,opacity:1},200);
}
function collapse() {
clearTimeout(t1);
t1 = setTimeout(function(){
theSpan.find('a').removeClass("selected");
theMenu.stop().animate({height:0,opacity:0},200,function(){
$(this).css({display:"block"});
});
}, 250);
}
theSpan.hover(expand, collapse);
theMenu.hover(expand, collapse);
});
}
$(document).ready(function(){
dropMenu(".nav_li");
});
var txtSwiper = new Swiper('.txt-swiper', {
loop: true,
speed: 1000,
spaceBetween: 0,
//effect: 'fade',
autoplay: {
delay: 8000,
disableOnInteraction: false,
},
pagination: {
el: ".swiper-banner",
clickable: true,
renderBullet: function (index, className) {
return '' + (index + 1) + "";
},
},
navigation: {
nextEl: '.banner-prev',
prevEl: '.banner-next',
},
on: {
transitionStart: function() {
//console.log(this.realIndex)
delay = this.params.autoplay.delay
anime({
targets: '.path-loop1',
delay: 0,
strokeDashoffset: function (el) {
var svgLength = anime.setDashoffset(el);
return [svgLength, 0];
},
easing: "linear",
duration: delay
});
},
}
});
var newsleftSwiper = new Swiper('.news_txt', {
loop: true,
speed: 1000,
spaceBetween: 20,
autoplay: {
delay: 6000,
disableOnInteraction: false,
},
// pagination: {
// el: ".swiper-banner",
// clickable: true,
// renderBullet: function (index, className) {
// return '' + (index + 1) + "";
// },
// },
navigation: {
nextEl: '.news-prev',
prevEl: '.news-next',
},
on: {
transitionStart: function() {
//console.log(this.realIndex)
delay = this.params.autoplay.delay
anime({
targets: '.path-loop2',
delay: 0,
strokeDashoffset: function (el) {
var svgLength = anime.setDashoffset(el);
return [svgLength, 0];
},
easing: "linear",
duration: delay
});
},
}
});
var fcswiper = new Swiper(".fc_box .swiper-container", {
slidesPerView: 1,
spaceBetween: 0,
slidesPerGroup: 1,
loop: true,
speed:500,
effect: 'fade',
loopFillGroupWithBlank: true,
autoplay: {
delay: 5000,
disableOnInteraction: false,
},
pagination: {
el: '.swiper-fcpagination',
clickable: true,
},
});
var teachswiper = new Swiper(".teach_r .swiper-container", {
slidesPerView: 1,
spaceBetween: 0,
slidesPerGroup: 1,
loop: true,
loopFillGroupWithBlank: true,
autoplay: {
delay: 3500,
disableOnInteraction: false,
},
navigation: {
nextEl: ".swiper-teach-next",
prevEl: ".swiper-teach-prev",
},
});
var stuswiper = new Swiper(".student_center .swiper-container", {
slidesPerView: 1,
spaceBetween: 0,
slidesPerGroup: 1,
loop: true,
loopFillGroupWithBlank: true,
autoplay: {
delay: 3500,
disableOnInteraction: false,
},
pagination: {
el: '.swiper-Student',
clickable: true,
},
});
var campusswiper = new Swiper(".campus_box .swiper-container", {
slidesPerView: 4,
spaceBetween: 55,
slidesPerGroup: 1,
loop: true,
loopFillGroupWithBlank: true,
breakpoints: {
1024: {
slidesPerView: 4,
spaceBetween: 55,
},
768: {
slidesPerView: 2,
spaceBetween: 30
},
640: {
slidesPerView: 2,
spaceBetween: 30
},
320: {
slidesPerView: 2,
spaceBetween: 30
}
}
});
var acaswiper = new Swiper(".academic_box .swiper-container", {
slidesPerView: 3,
spaceBetween: 40,
slidesPerGroup: 1,
loop: true,
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
loopFillGroupWithBlank: true,
navigation: {
nextEl: ".swiper-aca-next",
prevEl: ".swiper-aca-prev",
},
breakpoints: {
1024: {
slidesPerView: 3,
spaceBetween: 40,
},
768: {
slidesPerView: 2,
spaceBetween: 20
},
640: {
slidesPerView: 2,
spaceBetween: 20
},
320: {
slidesPerView: 2,
spaceBetween: 20
}
}
});
var hzswiper = new Swiper(".hz_box .swiper-container", {
slidesPerView: 4,
spaceBetween: 40,
slidesPerGroup: 1,
loop: true,
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
loopFillGroupWithBlank: true,
navigation: {
nextEl: ".swiper-hz-next",
prevEl: ".swiper-hz-prev",
},
breakpoints: {
1024: {
slidesPerView: 4,
spaceBetween: 40,
},
768: {
slidesPerView: 2,
spaceBetween: 20
},
640: {
slidesPerView: 2,
spaceBetween: 20
},
320: {
slidesPerView: 2,
spaceBetween: 20
}
}
});
$(function () {
var fcTobox = new Swiper('.fcCenter .swiper-container', {
speed: 500,
on: {
slideChangeTransitionStart: function () {
$(".fc_list .on").removeClass('on');
$(".fc_list li").eq(this.activeIndex).addClass('on');
}
}
})
$(".fc_list li").on('mousemove', function (e) {
console.log($(this));
e.preventDefault()
$(".fc_list .on").removeClass('on')
$(this).addClass('on')
fcTobox.slideTo($(this).index());
})
});
$(".fc_list li").eq(0).addClass('on');
$('.pro_list li').mouseenter(function(){
$(this).addClass('on').siblings('li').removeClass('on')
})
$(".pro_list li").eq(0).addClass('on');
$('.case li').mouseenter(function(){
$(this).addClass('on').siblings('li').removeClass('on')
})
$(".case li").eq(0).addClass('on');
$('.product li').mouseenter(function(){
$(this).addClass('on').siblings('li').removeClass('on')
})
$(".product li").eq(0).addClass('on');
$('.news_t,.title').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.1 + 's')
})
$('.news_box .news_l').each(function (index) {
$(this).addClass('wow fadeInLeft')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.1 + 's')
})
$('.news_box .news_r').each(function (index) {
$(this).addClass('wow fadeInRight')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.2 + 's')
})
$('.notice_box li').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.15 + 's')
})
$('.fc_box').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.2 + 's')
})
$('.academic_t,.dynamics_t').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '2s')
$(this).attr('data-wow-delay', (index + 1) * 0.3 + 's')
})
$('.teach_l,.teach_r ').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1.5s')
$(this).attr('data-wow-delay', (index + 1) * 0.2 + 's')
})
$('.teach_list li').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.1 + 's')
})
$('.dynamicbox li').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.1 + 's')
})
$('.student_box').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.1 + 's')
})
$('.product li').each(function (index) {
$(this).addClass('wow fadeInUp')
$(this).attr('data-wow-duration', '1s')
$(this).attr('data-wow-delay', (index + 1) * 0.1 + 's')
})
new WOW(
{
mobile: false, //是否在移动端使用
}).init()
$(function () {
var sTop = 0;
var x = $("#fixedNav").offset().top;
$(window).scroll(function () {
sTop = $(this).scrollTop();
if (sTop >= 150) {
$("#fixedNav").addClass("fixedNav");
} else {
$("#fixedNav").removeClass("fixedNav");
}
});
});
// 栏目页
$(".sub-nav-p-s").click(function (e) {
$(this).next('ul').stop().slideToggle();
$(this).toggleClass('on');
$(document).one("click", function () {
$(".subnav2s ul").slideUp();
$(".sub-nav-p-s").removeClass('on')
});
e.stopPropagation();
})