|
Server : nginx/1.18.0 System : Linux iZrj9edhd5u5pfsek09o1jZ 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /mnt/web/www.neatabattery.com/template/pc/skin/js/ |
// banner轮播图
var swiper = new Swiper('.banner', {
spaceBetween: 0,
loop: true,
// speed:2000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
pagination: {
el: '.banner .swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.banner .swiper-button-next',
prevEl: '.banner .swiper-button-prev',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 1,
spaceBetween: 0
},
768: { //当屏幕宽度大于等于768
slidesPerView: 1,
spaceBetween: 0
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 1,
spaceBetween: 0
}
}
});
var swiper = new Swiper('.cpzx-b .swiper-container', {
spaceBetween: 0,
// loop: true,
speed:1000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
pagination: {
el: '.cpzx-b .swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.cpzx-b .swiper-button-next',
prevEl: '.cpzx-b .swiper-button-prev',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 1,
spaceBetween: 10
},
768: { //当屏幕宽度大于等于768
slidesPerView: 1,
spaceBetween: 10
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 2,
slidesPerColumn: 2,
spaceBetween: 30
}
}
});
var swiper = new Swiper('.gywm-r .swiper-container', {
spaceBetween: 0,
loop: true,
speed:1000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
pagination: {
el: '.gywm-an p',
type: 'fraction',
},
navigation: {
nextEl: '.gywm-r .a2',
prevEl: '.gywm-r .a1',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 1,
spaceBetween: 10
},
768: { //当屏幕宽度大于等于768
slidesPerView: 1,
spaceBetween: 10
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 3,
centeredSlides: true,
spaceBetween: 0
}
}
});
var swiper = new Swiper('.cpzx2 .swiper-container', {
spaceBetween: 0,
loop: true,
speed:1000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
navigation: {
nextEl: '.cpzx2 .p2',
prevEl: '.cpzx2 .p1',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 1,
spaceBetween: 10
},
768: { //当屏幕宽度大于等于768
slidesPerView: 1,
spaceBetween: 10
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 4,
spaceBetween: 40
}
}
});
var swiper = new Swiper('.ryzz-t1 .swiper-container', {
spaceBetween: 0,
// loop: true,
speed:1000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
// autoplay: {
// delay: 4000,
// disableOnInteraction: false,
// },
navigation: {
nextEl: '.ryzz-t1 .a2',
prevEl: '.ryzz-t1 .a1',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 1,
spaceBetween: 10
},
768: { //当屏幕宽度大于等于768
slidesPerView: 1,
spaceBetween: 10
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 4,
spaceBetween: 30
}
}
});
var swiper = new Swiper('.ryzz-t3 .swiper-container', {
spaceBetween: 0,
// loop: true,
speed:1000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
// autoplay: {
// delay: 4000,
// disableOnInteraction: false,
// },
navigation: {
nextEl: '.ryzz-t3 .a2',
prevEl: '.ryzz-t3 .a1',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 2,
spaceBetween: 10
},
768: { //当屏幕宽度大于等于768
slidesPerView: 2,
spaceBetween: 10
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 5,
spaceBetween: 90
}
}
});
var swiper = new Swiper('.gywm3 .swiper-container', {
spaceBetween: 0,
loop: true,
speed:1000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
navigation: {
nextEl: '.gywm3 .a2',
prevEl: '.gywm3 .a1',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 2,
spaceBetween: 10
},
768: { //当屏幕宽度大于等于768
slidesPerView: 2,
spaceBetween: 10
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 5,
spaceBetween: 40
}
}
});
var swiper = new Swiper('.gywm4 .swiper-container', {
spaceBetween: 0,
loop: true,
speed:1000,
observer:true,//这是解决swiper在tab选项卡切换后不会滑动
observeParents:true,//这是解决swiper在tab选项卡切换后不会滑动
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
navigation: {
nextEl: '.gywm4 .a2',
prevEl: '.gywm4 .a1',
},
breakpoints: {
320: { //当屏幕宽度大于等于320
slidesPerView: 2,
spaceBetween: 10
},
768: { //当屏幕宽度大于等于768
slidesPerView: 2,
spaceBetween: 10
},
1200: { //当屏幕宽度大于等于1280
slidesPerView: 5,
spaceBetween: 40
}
}
});
// 全部文件加载完再加载这里的js
// $(window).load(function(){
// })
// 鼠标经过和鼠标点击
// $(document).ready(function() {
// $(".jjfa-b1 a").mouseenter(function() {
// $(".jjfa-b1 a").eq($(this).index()).addClass("active").siblings().removeClass('active');
// $(".jjfa-b2").hide().eq($(this).index()).css({"display":"flex"});
// });
// });
// $(document).ready(function() {
// $(".jjfa-b1 a").click(function() {
// $(".jjfa-b1 a").eq($(this).index()).addClass("active").siblings().removeClass('active');
// $(".jjfa-b2").hide().eq($(this).index()).css({"display":"flex"});
// });
// });
$(window).scroll(function(){
if($(window).scrollTop() >= 1){
$(".head").addClass('head2')
}else{
$(".head").removeClass('head2');
}
});
// 点击弹出视频
$(window).load(function(){
var myvideo=$("#sp");
$(".sfdsdjl").click(function() {
$('#sp').attr('src',$(this).attr("attr-href"));
$("#top_p1").show();
$("#fade").show();
// $('#sp').trigger('play');
})
$(".top_popupbox a").click(function() {
$("#top_p1").hide();
$("#fade").hide();
// $('#sp').trigger('pause');
})
})
$(".head-s-r2").click(function (){
$("body").css({"overflow":"hidden"});
$(".head3").show(500);
var a=$(".head3-l dl").length;
var b=100/a;
$(".head3-l dl").css({"width":b+"%"})
})
$(".head3 button").click(function (){
$("body").css({"overflow":"auto"});
$(".head3").hide(500);
})
// 返回顶部
$("#fhdb").click(function (){
$('body,html').animate({ scrollTop: 0 }, 300);
})
// 手机端头部开始
window.onload=function(){
var a=document.getElementById('a');
var b=document.getElementById('b');
var c=document.getElementById('c');
var oBtn=document.getElementById('btn');
var oNav=document.getElementById('dh');
oBtn.addEventListener('click',function(){
if(a.className=='one',b.className=='two')
{
a.className=''
b.className=''
c.style.opacity='1';
oNav.style.top="-100%";
}
else
{
a.className='one'
b.className='two'
c.style.opacity='0'
oNav.style.top="0";
}
})
}
$(document).ready(function(){
var arrow = $(this).find("span.arrow");
$("ul.kj li > div.t").click(function(){
var arrow = $(this).find("span.arrow");
if(arrow.hasClass("up")){
arrow.removeClass("up");
arrow.addClass("down");
}else if(arrow.hasClass("down")){
arrow.removeClass("down");
arrow.addClass("up");
}
$(this).parent().siblings().each(function(index,el) {
$(el).find("ul.menu").slideUp();
$(el).find(".arrow").removeClass("up").addClass("down");
});
$(this).parent().find("ul.menu").slideToggle();
});
$(".cjwt-b dl dt").click(function(){
$(".cjwt-b dl dt").removeClass("active");
var arrow = $(this).parent().find("dd");
if(arrow.is(':hidden')){
$(this).addClass("active");
}else{
$(this).removeClass("active");
}
$(this).parent().siblings().each(function(index,el) {
$(el).find("dd").slideUp();
});
$(this).parent().find("dd").slideToggle();
});
$("ul.kj li .t2").click(function(){
var arrow = $(this).find("span.arrow");
if(arrow.hasClass("up")){
arrow.removeClass("up");
arrow.addClass("down");
}else if(arrow.hasClass("down")){
arrow.removeClass("down");
arrow.addClass("up");
};
$(this).parent().siblings().each(function(index,el) {
$(el).find(".menu2").slideUp();
});
$(this).siblings('.menu2').slideToggle();
});
});
// 手机端头部结束
//
function changeyuyan(yuyan){
$.get('Base-chagelang.html', {l:yuyan},function(data){
/*console.log(data);
return false;*/
window.location.reload()
if(data!==''){
window.location.href=window.location.href;
}
});
}
//
// 改变浏览器窗口大小的时候 让页面自动刷新
// $(window).resize(function(){
// location.reload()
// });
//
// 手机端底部开始
$(".footer2-t").click(function(){
var arrow = $(this).find("span.arrow");
if(arrow.hasClass("up")){
arrow.removeClass("up");
arrow.addClass("down");
}else if(arrow.hasClass("down")){
arrow.removeClass("down");
arrow.addClass("up");
};
$(this).parent().siblings().each(function(index,el) {
$(el).find(".footer2-b").slideUp();
});
$(this).siblings('.footer2-b').slideToggle();
});
//
// wow动画
if($("body").width()>1200){
if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
new WOW().init();
};
}
//
// 点击弹出图片放大
$(document).ready(function () {
$(".image-list2").piroBox({
my_speed: 400, //animation speed
bg_alpha: 0.7, //background opacity
slideShow: true, // true == slideshow on, false == slideshow off
slideSpeed: 4, //slideshow duration in seconds(3 to 6 Recommended)
close_all: '.piro_close,.piro_overlay'// add class .piro_overlay(with comma)if you want overlay click close piroBox
});
});
//