$(function () { //搜索模块 $(".search_top>li").click(function () { // console.log($(this)); $(this).children("span").addclass("red_"); $(this).css({ "color": "#333" }).siblings().css({ "color": "#a8a8a8" }); $(this).siblings().children("span").removeclass("red_").css({ "color": "#a8a8a8" }); // console.log($(this).index()); if ($(this).index() == 1) { $(".searchtwo").fadein(700).siblings().hide(); } else { $(".searchone").fadein(700).siblings().hide(); } }) $("input").on('input', function () { $(this).addclass("inp_active") }) $("input").on('click', function () { console.log($(this)[0].placeholder); $(this)[0].placeholder = ""; }) $(".searchtwo input").on('mouseleave', function () { $(this)[0].placeholder = "搜索产品样本..."; }) $(".searchone input").on('mouseleave', function () { $(this)[0].placeholder = "搜索产品样本..."; }) //download模块 $('.download>ul').hover( function () { $(this).find(".red1").stop().fadeout(0) $(this).find(".red2").css({ "height": "0.15rem", }) }, function () { $(this).find(".red2").css({ "height": "0rem", }) $(this).find(".red1").delay(1000).stop(false, true).fadein(5000) } ) $('.page_num').on('click', function () { let $this = $(this); if (!$this.find('div').hasclass('prev_next')) { $this.addclass("page_active").siblings().removeclass("page_active"); } }) })