details.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // var slideout = new Slideout({
  2. // 'panel': document.getElementById('y_sidebarl'),
  3. // 'menu': document.getElementById('y_sidebarr'),
  4. // 'padding': 280,
  5. // 'tolerance': 70,
  6. // 'side': 'right',
  7. // });
  8. // document.querySelector('.y_publicright').addEventListener('click', function() {
  9. // slideout.toggle();
  10. // document.querySelector('.y_sidebarbg').style.display="block";
  11. // });
  12. // document.querySelector('.y_sidebarbg').addEventListener('click', function() {
  13. // slideout.toggle();
  14. // this.style.display="none";
  15. // });
  16. $('#wdemo07').navbarscroll({
  17. defaultSelect:0,
  18. scrollerWidth:3,
  19. fingerClick:0,
  20. endClickScroll:function(obj){
  21. // console.log(obj.text())
  22. }
  23. });
  24. /*
  25. * 楼盘预售许可证弹窗
  26. *
  27. */
  28. $(function(){
  29. var lic_id; //为了这些变量在其它地方用;
  30. $('.y_ckysz').on('click',function(){
  31. var $that = $(this);
  32. var height = $('.y_licence').outerHeight();
  33. var width = $('.y_licence').outerWidth();
  34. CreatePopLayerDivlp(width,width,'/public/licence');
  35. $('#offDivlp').css({'top':height+'px'}).animate({top:'20%'})
  36. // 向弹窗传数据
  37. parent.lic_id = $that.attr('data-id'); //把楼盘名称传向父级
  38. })
  39. // 看房定制数量修改
  40. var random = Math.floor(Math.random()*150+101);
  41. // console.log(random)
  42. $('.y_lpkfdz_dzrs span em').html(random)
  43. })
  44. //创建一个弹出层,width 宽度,height 高度,url
  45. function CreatePopLayerDivlp(width,height,url){
  46. var Iheight=$(window).outerHeight();
  47. var Iwidth =$(window).outerWidth();
  48. var heights = height || 300;
  49. var widths = width || 500;
  50. var Oheight= (Iheight -heights) / 2;
  51. var Owidth = (Iwidth - widths) /2;
  52. 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;">';
  53. div+='<div id="offDivlp" style=" width:100%; height:100%; left:0px; top:30%; position:fixed;z-index:100003;">';
  54. div+='<div id="Contentlp"></div>';
  55. div+='</div>';
  56. div+='</div>';
  57. $(document.body).append(div);
  58. if(url != ""){
  59. $("#Contentlp").load(url);
  60. }
  61. }
  62. //移除弹出层
  63. function RemoveDiv1(){
  64. $("#InDivlp").remove();
  65. $("#offDivlp").remove();
  66. }
  67. function btnCloses1(){
  68. RemoveDiv1();
  69. }