nu_hover").removeClass("dropdown_menu_hover"); $(this).addClass("dropdown_menu_hover"); var cat_info = class4cat_info[i]; var cat_brand = class4cat_brand[i]; id4side_menu.hide(); class4cat_info.hide(); class4cat_brand.hide(); if (typeof(cat_info) != "undefined") { id4side_menu.show(); $(cat_info).show(); $(cat_brand).show(); } }, function () { }); }); id4side_menu.hover(function () { }, function () { $(this).hide(); }); $("#dropdown_div").hover(function () { }, function () { id4side_menu.hide(); class4cat_info.hide(); class4cat_brand.hide(); $(".dropdown_menu_hover").removeClass("dropdown_menu_hover"); }); $("#db_lxb_box_show").hover(function () { $(".frame_fixed_bd_lxb").toggle(); }); /*搜索功能*/ $("#search_btn").click(function () { var cate = $(".cur_search_category").val(); var key = $("#search_input2").val(); var extra = $("#search_select").val(); if (key && search_sections_datas != undefined && extra != 'left') { for (i in search_sections_datas) { if (search_sections_datas[i]['name'] == key) {/*匹配成功*/ cate = search_sections_datas[i]['category_code']; break; } } } var topSearchObj = {}; topSearchObj.category = cate ? cate : null; topSearchObj.keyword = key ? key : null; topSearchObj.tag_allow = key.length > 10 ? 1 : null; topSearchObj.extra = extra && extra != 'blur' ? extra : null; var p = ''; $.each(topSearchObj, function (i, v) { if (v && v != 'null') { if (p) { p += "&" + tagAlias(i) + "=" + encodeURIComponent(v); } else { p += tagAlias(i) + "=" + encodeURIComponent(v); } } }); if (p) { window.location.href = searchJumpUrl + p; } else { window.location.href = searchJumpUrl.replace('?', ''); } }); /*同步滚动*/ $('#s4left').mouseover(function () { syncScroll(1); }); $('#s4right').mouseover(function () { syncScroll(0); }) }); /* 底部浮动推荐 */ function freeIntro() { var id4fdtj_phone = $("#fdtj_phone"); var phone = id4fdtj_phone.val(); var detail_type = 221; clickBtn(detail_type); if (!phone) { id4fdtj_phone.val("请正确填写您的手机号").css({'color': 'rgb(255, 102, 0)'}); return; } /*验证手机号*/ if (!/^1[0-9]{10}$/.test(phone)) { id4fdtj_phone.val("手机号不正确").css({'color': 'rgb(255, 102, 0)'}); return; } $.post('/leave_phone', { '_token': csrf_token, 'email_type': 5, 'detail_type': detail_type, 'phone': phone }, function (result) { if (result.status == 1) { clickFrom(phone, detail_type); recordActivePhoneFun("4", phone, ""); HiTipsShow("亲,我们已经收到信息,客服会在30分钟内主动联系您!", "", 5000); } else { HiTipsShow(result.msg); } }); } var _hmt = _hmt || []; /*移除广告*/ function removeAd() { $("div").each(function () { if (/^ads.*_wrap$/.test($(this).attr("id"))) { $(this).remove(); } }); } window.onload = function () { setTimeout("removeAd()", 500); }; var flagScroll = 1; var maxSLeft = 0; var maxSRight = 0; var scaleLeft4Right = 2.5; function syncScroll(left) { flagScroll = left; var s4left = $('#s4left'); var s4right = $('#s4right'); maxSLeft = s4left.scrollTop() > maxSLeft ? s4left.scrollTop() : maxSLeft; maxSRight = s4right.scrollTop() > maxSRight ? s4right.scrollTop() : maxSRight; let scale = maxSRight / maxSLeft; if (left) { s4left.scroll(function () { if (flagScroll) { scaleLeft4Right = scaleLeft4Right > scale ? scale : scaleLeft4Right; s4right.scrollTop(s4left.scrollTop() * scaleLeft4Right); } }) } else { s4right.scroll(function () { if (!flagScroll) { scaleLeft4Right = scaleLeft4Right < scale ? scale : scaleLeft4Right; s4left.scrollTop(s4right.scrollTop() / scaleLeft4Right); } }) } }