var Publisher = new pub(); var config = $("body").data("config"); var city = $(".desinger_box").data("city"); var site = $(".desinger_box").data("site"); var local_story = window.localStorage; var filter_city = city; if (filter_city === "全国") { filter_city = "北京" } var index = (function () { function levelChange(that) { var level = $(that).val(); var style = $(".style").val(); var sjy = $(".sjy").val(); var sjs = $(".sjs").val(); var filter_le = { is_display: "true", valid: "true" }; // if (city === "南山" || city === "罗湖") { // filter_le = Object.assign(filter_le, { city: "深圳" }) // } if (sjs != "全部设计师") { filter_le.sjs = sjs; } else { delete filter_le.sjs; } if (style != "全部风格") { filter_le.style = style; } else { delete filter_le.style; } if (sjy != "全部设计院") { filter_le.sjy = sjy; } else { delete filter_le.sjy; } filter_le = Object.assign(filter_le, { city: filter_city }) var data = { filter: filter_le, // orderBy: { rank: -1 }, limit: 10000, startPos: 0, is_style: "false" }; Publisher.publish("get_designer_list", data); } function styleChange(that) { var filter_s = { is_display: "true", valid: "true" }; var sjs = $(".sjs").val(); var style = $('.style').val(); var sjy = $('.sjy').val(); if (style != "全部风格") { filter_s.style = style; } else { delete filter_s.style; } if (sjs != "全部设计师") { filter_s.sjs = sjs; } else { delete filter_s.sjs; } if (sjy != "全部设计院") { filter_s.sjy = sjy; } else { delete filter_s.sjy; } // if (city === "南山" || city === "罗湖") { // filter_s = Object.assign(filter_s, { city: "深圳" }) // } filter_s = Object.assign(filter_s, { city: filter_city }) var data = { filter: filter_s, orderBy: { rank: -1 }, limit: 10000, startPos: 0, is_style: "true" }; Publisher.publish("get_designer_list", data); } //设计师模块 var num = 0; var designer_item = 0; var designer_num = 0; var run = true; var designer_item_count = 0; var desingerRun = function desingerRun() { var speed = 20; var tab = document.getElementById("demoin"); var tab1 = document.getElementById("demo1"); var tab2 = document.getElementById("demo2"); var tab3 = document.getElementById("demo3"); var copy = document.getElementById("copy"); designer_item_count = $(".desinger_card .designer_item").length; var desinger_card = document.getElementById("desinger_card_box"); if (designer_item_count >= 4) { copy.innerHTML = desinger_card.innerHTML; } if (designer_item_count >= 21) { tab2.innerHTML = tab1.innerHTML; tab3.innerHTML = tab1.innerHTML; } designer_item_count = $(".desinger_card .designer_item").length; $("#demoin").width(designer_item_count * 57 * 3); $("#designer_run").width(308 * designer_item_count * 3); function Marquee() { if (num == -designer_item_count * 57) { num = 0; } num -= 1; $("#demoin").css({ left: num }); } if (num === -$("#demoin").width()) { num = -57; } $("#demoin").css({ left: num }); var timer = setInterval(Marquee, speed); clearInterval(timer); $(".designer_btn_lf img").click(function () { if (designer_num > 0) { designer_num -= 1; } designer_item = -(308 * designer_num); $("#designer_run").css({ left: designer_item }); }); $(".designer_btn_rt img").click(function () { if (designer_num < designer_item_count) { designer_num += 1; } if (designer_num >= designer_item_count - 3) { designer_num = 0; } designer_item = -(308 * designer_num); $("#designer_run").css({ left: designer_item }); }); $("#demo img").click(function () { designer_item_count = $(".desinger_card .designer_item").length; run = false; var index = Number($(this).attr("index")); designer_num = index; num = -(57 * index); designer_item = -(308 * index); if (index === 0) { num = -(57 * index); } if (designer_item_count > 21) { $("#demoin").css({ left: num }); } $("#designer_run").css({ left: designer_item }); }); $("#demo img").mouseover(function () { $(this).addClass("zoom_img"); $(this) .parent() .removeClass("designer_mask"); }); $("#demo img").mouseout(function () { $(this).removeClass("zoom_img"); $(this) .parent() .addClass("designer_mask"); }); tab.onmouseout = function () { if (run && designer_item_count >= 21) { timer = setInterval(Marquee, speed); } }; tab.onmouseover = function () { run = true; clearInterval(timer); }; $(".sjs").change(function (l) { designer_item_count = $(".desinger_card .designer_item").length; run = true; clearInterval(timer); $("#demoin").css({ left: 0 }); styleChange(this); }); // 选择设计师 $(".style").change(function (s) { designer_item_count = $(".desinger_card .designer_item").length; run = true; clearInterval(timer); $("#demoin").css({ left: 0 }); styleChange(this); }); // 选择设计院 $(".sjy").change(function (s) { designer_item_count = $(".desinger_card .designer_item").length; run = true; clearInterval(timer); $("#demoin").css({ left: 0 }); styleChange(this); }); }; //五大理由 var reasonRun = function () { var reason_num = 0; var slide_box = document.getElementById("slide_box"); var slide_box2 = document.getElementById("slide_box2"); slide_box2.innerHTML = slide_box.innerHTML; var slide_length = $(".slide_box .slide").length; var speed = 1000; var timeout = 3000; var delay = speed + timeout; $(".reason_wrapper").width(slide_length * 238 * 2); $(".slide_box").width(slide_length * 238); function Marquee() { reason_num++; if (reason_num > slide_length) { reason_num = 0; $(".reason_wrapper") .stop() .animate( { left: -reason_num * 238 }, 0, function () { $(".reason_wrapper") .stop() .animate( { left: -1 * 238 }, 1000 ); reason_num++; } ); } else { $(".reason_wrapper") .stop() .animate( { left: -reason_num * 238 }, 1000 ); } } $(".reason_wrapper .slide").mouseover(function () { $(this).addClass("slide_hover"); $(this) .find(".reason_slide") .hide(); $(this) .find(".reason_slide_hover") .show(); }); $(".reason_wrapper .slide").mouseleave(function () { $(this).removeClass("slide_hover"); $(this) .find(".reason_slide") .show(); $(this) .find(".reason_slide_hover") .hide(); }); var timer = setInterval(Marquee, delay); $(".reason_container").mouseover(function () { $(".reason_next").show(); $(".reason_prev").show(); clearInterval(timer); }); $(".reason_container").mouseleave(function () { $(".reason_next").hide(); $(".reason_prev").hide(); timer = setInterval(Marquee, delay); }); $(".reason_next").click(function () { reason_num++; if (reason_num > slide_length) { reason_num = 0; $(".reason_wrapper") .stop() .animate( { left: -reason_num * 238 }, 0, function () { $(".reason_wrapper") .stop() .animate( { left: -1 * 238 }, 1000 ); reason_num++; } ); } else { $(".reason_wrapper") .stop() .animate( { left: -reason_num * 238 }, 1000 ); } clearInterval(timer); }); $(".reason_prev").click(function () { reason_num--; if (reason_num < 0) { reason_num = slide_length; $(".reason_wrapper").animate( { left: -reason_num * 238 }, 0, function () { reason_num--; $(".reason_wrapper").animate( { left: -reason_num * 238 }, 1000 ); } ); } else { $(".reason_wrapper").animate( { left: -reason_num * 238 }, 1000 ); } clearInterval(timer); }); }; //数组去除函数 function unique(arr) { var obj = {}; return arr.filter(function (item, index, arr) { return obj.hasOwnProperty(typeof item + item) ? false : (obj[typeof item + item] = true) }) } function deepClone(obj) { var objClone = Array.isArray(obj) ? [] : {}; if (obj && typeof obj === "object") { for (key in obj) { if (obj.hasOwnProperty(key)) { //判断ojb子元素是否为对象,如果是,递归复制 if (obj[key] && typeof obj[key] === "object") { objClone[key] = deepClone(obj[key]); } else { //如果不是,简单复制 objClone[key] = obj[key]; } } } } return objClone; } Publisher.subscribe("reasonRun", reasonRun); Publisher.subscribe("desingerRun", desingerRun); Publisher.subscribe("get_designer_list", function (datas) { designer_num = 0; designer_item = 0; designer_item = -(308 * designer_num); $("#designer_run").css({ left: designer_item }); var newFilter = deepClone(datas); if (datas.is_style == "true") { delete datas.filter.level; delete datas.is_style; } else { delete datas.filter.style; delete datas.is_style; } console.log(datas); $.get( "api.php?m=Sjs" + // site + // "/?url=" + // encodeURIComponent("mk/anon/get_designer_list") + "&data=" + encodeURIComponent(JSON.stringify(datas)), function (result) { var designers = result.data; var designerobj = {}; var new_designers = []; // if (newFilter.is_style == "true") { // //风格改变 // var levelHTML_option = ""; // var designers_levels = []; // var filter_level_name = newFilter.filter.level || ""; // for (var le = 0; le < designers.length; le++) { // if (!filter_level_name) { // new_designers.push(designers[le]); // } else if (designers[le].level == filter_level_name) { // new_designers.push(designers[le]); // } // designers_levels.push(designers[le].level); // } // designers_levels = unique(designers_levels); // for (var lev = 0; lev < designers_levels.length; lev++) { // if (designers_levels[lev] == filter_level_name) { // levelHTML_option = // levelHTML_option + // ""; // } else { // levelHTML_option = // levelHTML_option + // ""; // } // } // $(".level").html(levelHTML_option); // } else { //资质改变 // var styleHTML_option = ""; // var designers_styles = []; // var filter_style_name = // (newFilter.filter.style && // newFilter.filter.style.name) || // ""; var bigHTML = smallHTML= ''; // console.log(designers) if(designers==null){ $(".desinger_card").html(''); $('#copy').html(''); $("#demo1").html(''); $("#demo2").html(''); $("#demo3").html(''); return } for (var i = 0; i < designers.length; i++) { new_designers.push(designers[i]); // var styleList = JSON.parse(designers[i].style); // if (!filter_style_name) { // new_designers.push(designers[i]); // } // for (var ii = 0; ii < styleList.length; ii++) { // var style_name = styleList[ii].name; // if (!filter_style_name) { // } else if (style_name == filter_style_name) { // new_designers.push(designers[i]); // } // // if (designers_styles.indexOf(style_name) < 0) { // // designers_styles.push(style_name); // // } // } var yzsjs = sj_jbdata[designers[i]['sjs']]; bigHTML += ''; bigHTML +='
'; bigHTML +='
'+yzsjs+'点击更多
'; bigHTML +='
'+yzsjs+''; bigHTML +='
'+yzsjs+'
'; bigHTML +='
'; bigHTML +='
'; bigHTML +='
'+designers[i]['title']+'
'; bigHTML +='
'; bigHTML +='
从业经验-'+designers[i]['cyjt']+'年
'; bigHTML +='
案例作品-'+designers[i]['alzp']+'件
'; bigHTML +='
'+designers[i]['zw']+'
'; bigHTML +='
'; bigHTML +='
'; smallHTML += ''+designers[i]['title']+''; } // designers_styles = unique(designers_styles); // for (var s = 0; s < designers_styles.length; s++) { // if (designers_styles[s] == filter_style_name) { // styleHTML_option = // styleHTML_option + // ""; // } else { // styleHTML_option = // styleHTML_option + // ""; // } // } // $(".style").html(styleHTML_option); // } // designerobj.designers = new_designers; // designerobj.city = site; // var bigHTML = RenderDOM.render("bigDesingerDom", designerobj, config); // var smallHTML = RenderDOM.render("desingersSmall", designerobj, config); // console.log(bigHTML); // console.log(smallHTML); $(".desinger_card").empty(); $("#copy").empty(); $(".desinger_card").html(bigHTML); var desinger_card = document.getElementById("desinger_card_box"); var designer_copy = document.getElementById("copy"); designer_item_count = $(".desinger_card .designer_item").length; // if (designer_item_count > 4) { designer_copy.innerHTML = desinger_card.innerHTML; // } $("#demo1").empty(); $("#demo2").empty(); $("#demo3").empty(); $("#demo1").html(smallHTML); if (designer_item_count >= 21) { $("#demo2").html(smallHTML); $("#demo3").html(smallHTML); } if(designer_item_count==0){ return ; } $("#demo img").click(function () { designer_item_count = $(".desinger_card .designer_item").length; run = false; var index = Number($(this).attr("index")); designer_num = index; num = -(57 * index); designer_item = -(308 * index); if (index === 0) { num = -(57 * index); } if (designer_item_count > 21) { $("#demoin").css({ left: num }); } $("#designer_run").css({ left: designer_item }); }); $("#demo img").mouseover(function () { $(this).addClass("zoom_img"); $(this) .parent() .removeClass("designer_mask"); }); $("#demo img").mouseout(function () { $(this).removeClass("zoom_img"); $(this) .parent() .addClass("designer_mask"); }); //设计师特效 var w = $(".desonger_img_box img").width(); var h = $(".desonger_img_box img").height(); var w2 = w + 10; var h2 = h + 10; $(".desinger_hover").hover( function () { $(this).addClass("desinger_hover_box"); $(this) .find(".designer_more") .addClass("show"); $(this) .find(".more_icon") .addClass("show"); $(this) .parent() .find(".desonger_img_box img") .stop() .animate({ width: w2, height: h2, position: "absolute", left: "-1000px", top: "-10px" }); $(this) .parent() .find(".desinger_hover") .addClass("desinger_hover_show"); $(this) .parent() .find(".designer_level") .hide(); }, function () { $(this).removeClass("desinger_hover_box"); $(this) .find(".more_icon") .removeClass("show"); $(this) .find(".designer_more") .removeClass("show"); $(this) .parent() .find(".desonger_img_box img") .stop() .animate({ width: w, height: h, left: "0", top: "0" }); $(this) .parent() .find(".designer_level") .show(); } ); } ); }); })(); $(document).ready(function () { if (local_story.hasOwnProperty("old_time")) { local_story.removeItem("old_time") } $(".banner").hover( function () { $(".banner_mask").addClass("show"); }, function () { $(".banner_mask").removeClass("show"); } ); $(".banner_mask").hover( function () { $(".prev").addClass("show"); $(".next").addClass("show"); }, function () { $(".prev").removeClass("show"); $(".next").removeClass("show"); } ); var num = $("#num_run").text(); var unmArgs = { num: num, id: "num_run", spped: 3000 }; RenderDOM.render("numRun", unmArgs); $(".qcode_li").mouseover(function () { $(".wx_qcode img").show(); }); $(".qcode_li").mouseleave(function () { $(".wx_qcode img").hide(); }); var area_price = { bj: 5000, sh: 4000, wh: 3000, tj: 3500 }; var data = { filter: {}, orderBy: { create_at: -1 }, limit: 10, startPos: 0 }; $(".banner_city_select").change(function (value) { var select_city = $(this).val(); window.location.href = select_city; }); $(".designer_btn_lf img").mouseover(function () { $(this).attr("src", "/weboms/Template/pc_web/statics/images/btn_lf.png"); }); $(".designer_btn_lf img").mouseout(function () { $(this).attr("src", "/weboms/Template/pc_web/statics/images/unbtn_lf.png"); }); $(".designer_btn_rt img").mouseover(function () { $(this).attr("src", "/weboms/Template/pc_web/statics/images/btn_rt.png"); }); $(".designer_btn_rt img").mouseout(function () { $(this).attr("src", "/weboms/Template/pc_web/statics/images/unbtn_rt.png"); }); Publisher.publish("reasonRun"); Publisher.publish("desingerRun"); //设计师特效 var w = $(".desonger_img_box").width(); var h = $(".desonger_img_box").height(); var w2 = w + 10; var h2 = h + 10; $(".desinger_hover").hover( function () { $(this).addClass("desinger_hover_box"); $(this) .find(".designer_more") .addClass("show"); $(this) .find(".more_icon") .addClass("show"); $(this) .parent() .find(".desonger_img_box img") .stop() .animate({ width: w2, height: h2, left: "-10px", top: "-10px" }); $(this) .parent() .find(".desinger_hover") .addClass("desinger_hover_show"); $(this) .parent() .find(".designer_level") .hide(); }, function () { $(this).removeClass("desinger_hover_box"); $(this) .find(".more_icon") .removeClass("show"); $(this) .find(".designer_more") .removeClass("show"); $(this) .parent() .find(".desonger_img_box img") .stop() .animate({ width: w, height: h, left: "0", top: "0" }); $(this) .parent() .find(".designer_level") .show(); } ); // ++++++++++++++++++++++++++++++++++++++++ //初始化 $(".customer_item_box .story_img_box") .eq(0) .addClass("img_as"); $(this) .find(".customer_name_box") .eq(0) .show(); $('.case-gr-cont .case_content').hide().eq(0).show(); //故事交互 function set_story(that) { // var st_num = 0; // let data = that.find(".story_img_box").data("story"); // data = { // "cnum":"SO2001100001", // "create_at":"2020-01-10 09:59:25", // "update_at":"2020-03-19 09:20:44", // "valid":"true", // "name":"熊先生", // "note":"", // "create_by_user":"US1905130001", // "last_modify_by_user":"US1905130001", // "title":"理想的家应如是!", // "article_id":"AR2001100001", // "city":"全国,北京,杭州,苏州,天津,成都,重庆,武汉,上海,南京,宁波,深圳,南山,罗湖,郑州,无锡", // "introduction":"我的家不需要张扬的、繁琐的符号来突显,我需要它平静、开放、包容,这个新家经过设计师精心的改造,最终为我们呈现出一个既能让身心彻底放松又能感受美妙时光带来的自由与释放。", // "comment":"熊先生:感谢尚层让我拥有了一个理想中的家!", // "rank":"2", // "head_img":"1d5caef80c6f0c12d32a68c25ab46b0e", // "face_imgs":"[{\"cnum\": \"S0002\", \"image\": \"85e34af027d3e48e506eebc0f30ebc5a\", \"create_at\": \"2020-03-19 09:20:44\", \"update_at\": \"2020-03-19 09:20:44\"}, {\"cnum\": \"S0003\", \"image\": \"63da4cc27bc9a8145c56c0597fb52f68\", \"create_at\": \"2020-03-19 09:20:44\", \"update_at\": \"2020-03-19 09:20:44\"}]", // "is_display":"true" // } var index = $(".customer_item_box").index($(that)); $('.case-gr-cont .case_content').hide().eq(index).show(); // console.log(index); $(".customer_item_box .story_img_box").removeClass("img_as"); $(".customer_name_box").hide(); that.find(".story_img_box").addClass("img_as"); that.find(".customer_name_box").show(); return // if (data) { // // data = JSON.parse(data); // var title = data.title ? data.title : ""; // // console.log(data); // // return; // $(".case_size").empty(); // $(".case_size").append( // '' + // title + // "" // ); // $(".content").empty(); // var contents = data.introduction || ""; // $(".content").html(contents); // $(".stroy_img_box").empty().append('
'); // $(".info_box").html(data.comment); // var imgarr = []; // var face_imgs = JSON.parse(data.face_imgs); // for(var f of face_imgs){ // var img_url = config.FILEHOST +"/"+ f.image; // imgarr.push(''); // } // $(".stroy_img_box").append(imgarr.join("")) // } } $(".customer_item_box").mouseenter(function () { // console.log(0) set_story($(this)); }); //选择尚层 $(".sc_item").mouseover(function () { $(this) .parent() .find(".sc_item_hover") .addClass("sc_item_hovered"); }); $(".sc_item_hover").mouseover(function () { $(this).addClass("sc_item_hovered"); }); $(".sc_item_hover").mouseleave(function () { $(this).removeClass("sc_item_hovered"); }); $(".sc_item_hover").mouseout(function () { $(this).removeClass("sc_item_hovered"); }); $(".sc_item_middle_content img").remove(); var video_data = $("#video").data("video"); var video_source = ""; if ( video_data && video_data[0] && video_data[0].video && video_data[0].video[0] && video_data[0].video[0].md5 ) { video_source = video_data[0].video[0].url; //播放器 var player = new Aliplayer( { id: "J_prismPlayer", source: video_source, skinLayout: [ { name: "bigPlayButton", align: "blabs", x: 30, y: 80 }, { name: "H5Loading", align: "cc" }, { name: "errorDisplay", align: "tlabs", x: 0, y: 0 }, { name: "infoDisplay" }, { name: "tooltip", align: "blabs", x: 0, y: 56 }, { name: "thumbnail" }, { name: "controlBar", align: "blabs", x: 0, y: 0, children: [ { name: "playButton", align: "tl", x: 15, y: 12 }, { name: "timeDisplay", align: "tl", x: 10, y: 7 }, { name: "fullScreenButton", align: "tr", x: 10, y: 12 }, { name: "subtitle", align: "tr", x: 15, y: 12 }, { name: "setting", align: "tr", x: 15, y: 12 }, { name: "volume", align: "tr", x: 5, y: 10 } ] } ], width: "100%", height: "500px", autoplay: false, isLive: false, rePlay: false, playsinline: true, preload: false, controlBarVisibility: "hover", useH5Prism: true, cover: "/weboms/Template/pc_web/statics/video/video_bc.gif" }, function (player) { $(".prism-big-play-btn").height($(".prism-cover").height() - 40) } ); player.on("ready", function (e) { $(".good-story-video-bc").css("display", "none"); }); var requestFullScreen = function (e) { $(".good-story-video").addClass("max_Screen"); $(".prism-big-play-btn").height($(".prism-cover").height() - 40) }; player.on("requestFullScreen", requestFullScreen); var cancelFullScreen = function (e) { $(".good-story-video").removeClass("max_Screen"); $(".prism-big-play-btn").height($(".good-story-video").height() - 40) }; player.on("cancelFullScreen", cancelFullScreen); } //案例轮播 var caseRun = (function () { var style_name = ""; var case_num = 1; var case_count = $(".case_run_item").length; $(".case_index_run_warp").width(1920 * case_count); function run(case_num) { if (case_num > 0) { $(".case_run_box").animate({ left: -(case_num - 1) * (325 + 1220) }); } } $(".case_style").mouseover(function () { $(".case_style").removeClass("case_selected"); $(this).addClass("case_selected"); }); $(".case_style").mouseleave(function () { if (style_name) { $(".case_style").removeClass("case_selected"); $(".case_style[name=" + style_name + "]").addClass("case_selected"); } }); function setContent(case_num, that) { if ($(".case_index_run_warp .case_run_item").length > 0) { var arry_1 = $(".case_index_run_warp .case_run_item") .eq(case_num - 1) .data("case"); var case_data = {}; var fgnavdata = $('#fg-nav-data').data('fg'); case_data = { "name":"西山甲壹号——《融·S》", "cnum":"CA2003060005", "style_name":"混搭风格", "description":"在作品中您可能看见的是空间,是层次,是材质,是色彩,也可能看到的是随意,但这正是我们所要表达的,在不经意中体现设计。", "url":"/case/CA2003060005.html" } if(arry_1!=undefined){ case_data['name'] = arry_1['data']['title']; case_data['description'] = arry_1['data']['sjly']; case_data['url'] = arry_1['data']['url']; case_data['style_name'] = fgnavdata[arry_1['fg']]; // console.log(case_data); } $(".case_run_box .case_run_item").removeClass("img_mask"); $(".case_run_box .case_run_item") .eq(case_num) .addClass("img_mask"); that .parent() .next() .find("p") .text((case_data || {}).name || ""); that .parent() .next() .find(".case_p") .text((case_data || {}).description || ""); style_name = ((case_data || {}).style_name || "").substring(0, 5); $(".case_style").removeClass("case_selected"); if (style_name) { console.log(style_name); $(".case_style[name=" + style_name + "]").addClass("case_selected"); } if (case_data && case_data.cnum) { that .parent() .next() .find(".case_detail") .attr("href", case_data.url); } } } setContent(1, $(".case_index_run_warp .case_run_item").eq(0)); $(".click-left").click(function () { var that = $(this); if (case_num > 1) { case_num--; } setContent(case_num, that); run(case_num); $(".left_count").text(case_num); }); $(".click-right").click(function () { var that = $(this); case_num++; // if (case_num > case_count) { // case_num = case_count; // } // if (case_num > case_count-1) { if(case_num > case_count){ var case_url = '/list-1/'; var hosturl = window.location.host; window.location.href = "http://" + hosturl + case_url; } setContent(case_num, that); run(case_num); $(".left_count").text(case_num); }); })(); //滚动事件 function throttle(method, delay, duration) { var timer = null, begin = new Date(); return function () { var context = this, args = arguments, current = new Date(); clearTimeout(timer); if (current - begin >= duration) { method.apply(context, args); begin = current; } else { timer = setTimeout(function () { method.apply(context, args); }, delay); } }; } $(window).scroll(function () { throttle(onmousewheel(), 100, 100) }); // 底部报价交互样式 function bottom_price_css() { var testmark2 = true $(".bottom_price").css({ "top": "90%" }) $(".bottom_price_center").css("display", "none") $(".bottom_price_right").css("display", "none") $(".bottom_price_left").css("border-bottom", "none") $(".bottom_price_left_btn").css("background-color", "transparent") $(".bottom_price_box").addClass("show") $(".bottom_price_left_btn").click(function () { testmark2 = false $(this).css("background-color", "transparent") }) $(".bottom_price_left_btn").hover(function () { $(this).css("background-color", "transparent") }, function () { if (testmark2) { $(this).css("background-color", "transparent") } testmark2 = true }) } bottom_price_css() function onmousewheel() { var top = 0; top = $(window).scrollTop(); if (top < 600) { bottom_price_css() //$(".ysf-chat-layer").show(); } else { var testmark = true $(".bottom_price").css({ "top": "50%" }) $(".bottom_price_center").css("display", "block") $(".bottom_price_right").css("display", "block") $(".bottom_price_left").css("border-bottom", "1px solid #414141") $(".bottom_price_left_btn").css("background-color", "#333") $(".bottom_price_left_btn").hover(function () { $(this).css("background-color", "#b8985f") }, function () { if (testmark) { $(this).css("background-color", "#333") } testmark = true; }) $(".bottom_price_left_btn").click(function () { testmark = false; $(this).css("background-color", "#b8985f") }) } } $(".banner_city_select option[city='" + site + "']").attr("selected", "selected") $(".customer_index_more").hover(function () { $(this).addClass("customer_index_more_hover") }, function () { $(this).removeClass("customer_index_more_hover") }) });