$(function(){ // v2改版 轮播 jQuery(".js_yhn_slide").slide({ mainCell: ".js_yhn_slideBox ul", effect: "left", mouseOverStop:true, autoPlay: true, trigger: "click", delayTime: 500, interTime: 5000 }); // 热销楼盘 var _hotCiry=$('.js_yv2Hotlp_nav a').eq(0).attr('data-city') $('.js_yv2Hotlp_nav a').eq(0).addClass('on').siblings().removeClass('on'); _hotHone(_hotCiry) $('.js_yv2Hotlp_nav a').on('click',function(){ _hotCiry=$(this).attr('data-city'); $(this).addClass('on').siblings().removeClass('on'); _hotHone(_hotCiry) }) // 帮你找房 报名电话轮播 $('.js_yv2_bwzfTell').myScroll({ speed: 40, //数值越大,速度越慢 rowHeight: 26 //li的高度 }); // 房产资讯 var _newsId=$('.js_newsNav a').eq(0).attr('data-id') $('.js_newsNav a').eq(0).addClass('on').siblings().removeClass('on'); _newsHone(_newsId); $('.js_newsNav a').on('click',function(){ _newsId=$(this).attr('data-id'); $(this).addClass('on').siblings().removeClass('on'); _newsHone(_newsId); }) // 团购优惠看房团 报名电话轮播 $('.js_news_right_telle').myScroll({ speed: 40, //数值越大,速度越慢 rowHeight: 26 //li的高度 }); // 帮你找房 $('.js_yv2_bwzfForm_city').on('click','.js_in_mina',function(){ $('.js_yv2_bcity_main').show(); }) $(document).click(function() { $('.js_yv2_bcity_main').hide(); }) $('.js_yv2_bwzfForm_city').on('click',function(e){ e?e.stopPropagation():event.cancelBubble = true; }) $('.js_yv2_bcity_main').on('click','a',function(){ var cityTxt=$(this).text(); $(this).addClass('on').siblings().removeClass('on'); $('.js_in_mina input.in_text').val(cityTxt); $('.js_yv2_bcity_main').hide(); }) //报名验证提交的调用 var fun = { "error" : function(){ PublicAction.hint("提交末成功!"); //编写需要操作的方法 }, "success" : function(){ PublicAction.hint("提交成功!"); //编写需要操作的方法 $('body input[type="text"]').val(''); $('.js_yv2_bcity_main a').removeClass('on'); RemoveDiv(); //数据提交成功后关闭弹出层 } } PublicAction.AjaxSend({CORID:'js_in_button'},fun); }); // 热销楼盘 ajax function _hotHone(id) { $.ajax({ url: "/json/pushcityhouselist", data: {city: id}, type: "POST", dataType: "json", success: function (data) {//请求成功完成后要执行的方法 if (data.code == 200) { $('.js_yv2Hotlp_box_left ul').html(''); var _html = ''; $.each(data.data, function (k, v) { var randomX = 0; var randomY = 14; var randvalue = parseInt(Math.random() * (randomX - randomY + 1) + randomY); _html+='
'; _html+=''+v.name+''; // _html+='['+v.city_name+']'; _html+='
'; _html+=''; if(v.sale_price){ _html+=''+v.sale_price+''+v.price_unit+''; }else{ _html+='待定'; } _html+='有效期至:'+v3Time+''; _html+='
'; _html+=' 向Ta咨询>'+v.preferential+'
'; }else if(v.news_name){ _html+=''; } _html+=''+v.subject+'
'; _htmlHd+=''; _htmlHd+='