123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- $(document).ready(function () {
- var swiperH = new Swiper('.swiper-container-h', {
- direction: 'horizontal',
- //loop: true, // 循环模式选项
- //autoplay: true, //自动轮播
- // delay: 9000,
- pagination: {
- el: '.swiper-pagination-h',
- },
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev',
- },
- spaceBetween: 50,
- on: {
- slideChangeTransitionEnd: function () {
- //alert(this.activeIndex); //切换结束时,告诉我现在是第几个slide
- var index = this.activeIndex;
- var $yewu = $('#tab_con1 .yewu');
- var $wangluo = $('#tab_con1 .wangluo');
- var $buding = $('#tab_con1 .buding');
- var $yunwei = $('#tab_con1 .yunwei');
- if (index == 0) {
- if ($wangluo.length != 0) {
- $.each($wangluo, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($buding.length != 0) {
- $.each($buding, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($yunwei.length != 0) {
- $.each($yunwei, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($yewu.length != 0) {
- $.each($yewu, function (index, item) {
- $(item).addClass('border')
- })
- }
- } else if (index == 1) {
- if ($yewu.length != 0) {
- $.each($yewu, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($buding.length != 0) {
- $.each($buding, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($yunwei.length != 0) {
- $.each($yunwei, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($wangluo.length != 0) {
- $.each($wangluo, function (index, item) {
- $(item).addClass('border')
- })
- }
- } else if (index == 2) {
- if ($yewu.length != 0) {
- $.each($yewu, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($wangluo.length != 0) {
- $.each($wangluo, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($yunwei.length != 0) {
- $.each($yunwei, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($buding.length != 0) {
- $.each($buding, function (index, item) {
- $(item).addClass('border')
- })
- }
- } else if (index == 3) {
- // 综合运维
- if ($yewu.length != 0) {
- $.each($yewu, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($wangluo.length != 0) {
- $.each($wangluo, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($buding.length != 0) {
- $.each($buding, function (index, item) {
- if ($(item).attr('class').indexOf('border') != -1) {
- $(item).removeClass('border')
- }
- })
- }
- if ($yunwei.length != 0) {
- $.each($yunwei, function (index, item) {
- $(item).addClass('border')
- })
- }
- }
- },
- },
- });
- $('.product_tmp_link').hover(function () {
- $('.product_tmp_icon').removeClass('is-leave')
- $(this).find('.product_tmp_icon').addClass('is-enter')
- },
- function () {
- $(this).find('.product_tmp_icon').addClass('is-leave')
- $('.product_tmp_icon').removeClass('is-enter')
- })
- $('.top').click(function (e) {
- e.preventDefault();
- $("body,html").animate({
- scrollTop: 0
- }, 500);
- });
- });
|