/*
* 楼盘预售许可证弹窗
*
*/
$(function(){
var lic_id; //为了这些变量在其它地方用;
$('.y_ckysz').on('click',function(){
var $that = $(this);
var height = $('.y_licence').outerHeight();
var width = $('.y_licence').outerWidth();
CreatePopLayerDiv2(width,width,'/public/licence');
$('#offDiv1').css({'top':height+'px'}).animate({top:'20%'})
// 向弹窗传数据
parent.lic_id = $that.attr('data-id'); //把楼盘名称传向父级
})
})
//创建一个弹出层,width 宽度,height 高度,url
function CreatePopLayerDiv2(width,height,url){
var Iheight=$(window).outerHeight();
var Iwidth =$(window).outerWidth();
var heights = height || 300;
var widths = width || 500;
var Oheight= (Iheight -heights) / 2;
var Owidth = (Iwidth - widths) /2;
var div ='
';
$(document.body).append(div);
if(url != ""){
$("#Content1").load(url);
}
}
//移除弹出层
function RemoveDiv1(){
$("#InDiv1").remove();
$("#offDiv1").remove();
}
function btnCloses1(){
RemoveDiv1();
}
var page=0;
var limit = 6;
lpindexdetails(page,limit);
$('.w_guess .w_ti a').on('click',function(){
if (page < 6) {
page++;
}else{
page=0;
};
lpindexdetails(page,limit);
})
// 猜你喜欢
function lpindexdetails(page,limit){
var city = $('.swiper-container .hot-house').attr('data-city');
var price = '';
var html = '';
$.ajax({
url: "/house/tall",
data:{city:city,price:price,page:page,limit:limit},
type: "POST",
dataType: "json",
success: function(data) {//请求成功完成后要执行的方法
if (data.code == 200) {
$.each(data.data, function (i, data) {
var randomX = 300;
var randomY = 800;
var randvalue = parseInt(Math.random() * (randomX - randomY + 1) + randomY);
html+= ' ';
});
$('.swiper-container .hot-house').html(html);
var mySwiper1= new Swiper("#yw_swiper",{
loop : true,
autoplay:5000,
slidesPerView :2.1,
slidesPerGroup : 1,
});
}
}
});
}
var _dataid = $('.m_hq li.cur').attr('dataid');
//demo示例六 通过id调取 底部菜单插件
$('#mdemo06').navbarscroll({
defaultSelect:_dataid,
scrollerWidth:6,
fingerClick:1,
endClickScroll:function(obj){
// console.log(obj.text())
}
});