123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- // 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 ='<div id="InDivlp" style="width:'+Iwidth+'px;height:'+Iheight+'px;background:rgba(0,0,0,0.6);position:fixed;z-index:10000;top:0;left:0;">';
- div+='<div id="offDivlp" style=" width:100%; height:100%; left:0px; top:30%; position:fixed;z-index:100003;">';
- div+='<div id="Contentlp"></div>';
- div+='</div>';
- div+='</div>';
- $(document.body).append(div);
- if(url != ""){
- $("#Contentlp").load(url);
- }
- }
- //移除弹出层
- function RemoveDiv1(){
- $("#InDivlp").remove();
- $("#offDivlp").remove();
- }
- function btnCloses1(){
- RemoveDiv1();
- }
|