// //导航 // let win_sTop = $(window).scrollTop(); // if(win_sTop != 0){ // $('#c_static_001-1672801132181').addClass('on_top'); // } // $(window).scroll(function(){ // if($(this).scrollTop() != 0){ // $('#c_static_001-1672801132181').addClass('on_top'); // }else{ // $('#c_static_001-1672801132181').removeClass('on_top'); // } // }) // //搜索出现与隐藏 // $('#c_static_001-1672801132181 .e_image-4').on('click',function(){ // $('#c_static_001-1672801132181 .e_form-6').slideToggle(); // }) // $('#c_static_001-1672801132181 .e_image-8').on('click',function(){ // $('#c_static_001-1672801132181 .e_form-6').slideToggle(); // }) //高亮 let href = location.pathname; /*获取面包屑*/ $(".s_list .p_list .p_loopitem a").addClass('sort_href'); $(".s_list .p_list .p_loopitem a").each(function (i, e) { let aa = $(e).attr("href"); /*获取a标签的href属性*/ if (aa == href) { // 自身样式 $(e).parents('.p_loopitem').addClass('active') .end().siblings('.p_loopitem').removeClass('active'); /*添加当前选中高亮样式,移除其他之前选中的的高亮样式*/ } }) // //分类高亮 // let href_split = href.split('/'); // if(href_split[1] === 'download'){ // $('#').eq(i).addClass('active'); // } // //分页高亮 // //记得给p_loopitem添加data-id属性,data-id="{{CID}}" // $(function(){ // $('.p_loopitem[data-id='+pageObj._detailId+']').addClass('select_click'); //+pageObj._detailId+ 因为pageObj._detailId是一个字符串变量,所以得用两个加号括起来,不然就是字符串pageObj._detailId了 // }) // //swiper引用 // $require(['swiper'], function () { // var leftSw = new Swiper('#'); // }) // //wow动画 // //data-wow-delay、data-wow-duration、data-wow-offset // $('#').each(function(i,ele){ // let a = i; // $(this).addClass('fadeInUp wow'); // }) // //锚点点击 // $('#').click(function() { // $("html, body").animate({ // scrollTop: $('#').offset().top-80 //80是距离顶部距离,如果导航栏固定,则是导航栏的高度 // }, { // duration: 100, // 过渡时间 // easing: "swing" // }) // }) // //点击效果 // $('#').click(function(){ // $(this).next().slideToggle(300).end().toggleClass('clicked'); // }) // //板块进入视口时对应的变化 // $('#').each(function(){ // let ele_h = $(this).height(); // let ele_top = $(this).offset().top; // let ele_index = $(this).index(); // $(window).scroll(function(){ // let sco_top = $(this).scrollTop()+175; //175时导航栏固定时的高度 // if((sco_top - ele_top) >=0 && (sco_top - ele_top) <= ele_h){ // //若进入视口时,该发生的对应的变化 // } // }) // })