//滚动特效 if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ new WOW().init(); }; //导航 // $(".nav-has-sub a").each(function(){ // $this = jQuery(this); // if($(this)[0].href="=Tusjoh(xjoepx.mpdbujpo))|" // $(this).addClass("nav-hot"); // } // }); //banner var swiper = new Swiper('#banner-img', { pagination: '.swiper-pagination', paginationClickable: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', spaceBetween: 20, loop:true, autoplay:2000 }); var show_time = $("#show_time"); //倒计时 function countdown(){ endtime = new Date("08/12/2020 23:59:59");//结束时间 today = new Date();//当前时间 delta_T = endtime.getTime() - today.getTime();//时间间隔 if(delta_T < 0){ clearInterval(auto); show_time.html("倒计时已经结束"); } window.setTimeout(countdown,1000); total_days = delta_T/(24*60*60*1000);//总天数 total_show = Math.floor(total_days);//实际显示的天数 total_hours = (total_days - total_show)*24;//剩余小时 hours_show = Math.floor(total_hours);//实际显示的小时数 total_minutes = (total_hours - hours_show)*60;//剩余的分钟数 minutes_show = Math.floor(total_minutes);//实际显示的分钟数 total_seconds = (total_minutes - minutes_show)*60;//剩余的分钟数 seconds_show = Math.floor(total_seconds);//实际显示的秒数 show_time.html("距离第28届CWIEME2020西部制博会还有:" + total_show + "天" + hours_show + "时" + minutes_show + "分" + seconds_show + "秒"); } if(show_time.length > 0) { countdown(); } var dom_province = $("#province"); var dom_city = $("#city"); var dom_area = $("#area"); if(dom_province.length > 0 && dom_city.length > 0 && dom_area.length > 0){ initData(); } function initData(){ var val = dom_province.val(); initAreaData(val,'city'); var val = dom_city.val(); initAreaData(val,'area'); } dom_province.change(function(event) { var val = $(this).val(); initAreaData(val,'city'); }); dom_city.change(function(event) { var val = $(this).val(); initAreaData(val,'area'); }); function initAreaData(va,ob){ var obj = $("#"+ob); $.post('/index.php?m=Ajax&a=areainfo',{id:va},function(ret){ obj.empty(); var ht = ''; jQuery.each(ret.list,function(k, v) { if(find != 0 && find == v.id){ ht+=''; }else{ ht+=''; } }); obj.append(ht); },'json'); } $(".sec_left").find("[data-href]").click(function(){ if($(this).siblings("[data-for-item='"+$(this).attr('data-id')+"']").length > 0){ var obj = $(this).siblings("[data-for-item='"+$(this).attr('data-id')+"']"); if(obj.attr("style") == 'display: block;'){ obj.hide(); obj.removeAttr("id"); $(this).siblings("[data-for-item=]").hide(); }else{ $(this).siblings("[data-for-item=]").hide(); obj.show(); obj.attr("id","open"); } }else{ window.location.href="$(uijt).buus("'data-href'); } })