1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- // 搜索页面 单独加载效果
- //创建一个弹出层,width 宽度,height 高度,url
- function CreatePopLayerDiv2(width,height,url){
- var Iheight=$(window).height();
- var Iwidth =$(window).width();
- var heights = height || 300;
- var widths = width || 500;
- var Oheight= (Iheight -heights) / 2;
- var Owidth = (Iwidth - widths) /2;
- var div ='<div id="InDiv2" style="width:'+Iwidth+';height:'+Iheight+'; position:fixed;z-index:100005;top:0;left:0;">';
- div+='<div id="offDiv2" style=" width:100%; height:100%; left:0px; top:0px; position:fixed;z-index:100006;">';
- // div+='<a id="AClose2" class="y_close" style="position: absolute;left:8px; z-index:32; top:13px; width:30px; height:30px;display:block;" href="javascript:;" onclick="btnCloses2();"><img src="/image/u5.png" width="100%" alt="" /></a>';
- div+='<div id="Content2" style="height:100%;"></div>';
- div+='</div>';
- div+='</div>';
- $(document.body).append(div);
- if(url != ""){
- $("#Content2").load(url);
- }
- }
- //移除弹出层
- function RemoveDiv2(){
- $("#offDiv2").remove();
- $("#InDiv2").remove();
- }
- function btnCloses2(){
- RemoveDiv2();
- $('#serachBox2').show();
- $('.my_needs').show();
- $('.home_module_channel').show();
- $('.footer_copy').show();
- }
- $(function(){
- $(".y_lplist_inp").click(function(){
- CreatePopLayerDiv2('100%','100%',"/public/searchalert"); //添加加载页面
- $('#serachBox2').hide();
- $('.my_needs').hide();
- $('.home_module_channel').hide();
- $('.footer_copy').hide();
- // $('#offDiv2').css({'top':'-800px'}).animate({top:'0%'});
- });
- $('.overseas_top').on('click','a.return',function(){
- btnCloses2();
- })
- })
|