// var slideout = new Slideout({ // 'panel': document.getElementById('y_sidebarl'), // 'menu': document.getElementById('y_sidebarr'), // 'padding': 280, // 'tolerance': 70, // 'side': 'right', // }); // document.querySelector('.y_publicright').addEventListener('click', function() { // slideout.toggle(); // document.querySelector('.y_sidebarbg').style.display="block"; // }); // document.querySelector('.y_sidebarbg').addEventListener('click', function() { // slideout.toggle(); // this.style.display="none"; // }); $('#wdemo07').navbarscroll({ defaultSelect:0, scrollerWidth:3, fingerClick:0, endClickScroll:function(obj){ // console.log(obj.text()) } }); /* * 楼盘预售许可证弹窗 * */ $(function(){ var lic_id; //为了这些变量在其它地方用; $('.y_ckysz').on('click',function(){ var $that = $(this); var height = $('.y_licence').outerHeight(); var width = $('.y_licence').outerWidth(); CreatePopLayerDivlp(width,width,'/public/licence'); $('#offDivlp').css({'top':height+'px'}).animate({top:'20%'}) // 向弹窗传数据 parent.lic_id = $that.attr('data-id'); //把楼盘名称传向父级 }) // 看房定制数量修改 var random = Math.floor(Math.random()*150+101); // console.log(random) $('.y_lpkfdz_dzrs span em').html(random) }) //创建一个弹出层,width 宽度,height 高度,url function CreatePopLayerDivlp(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 ='