//打开详情 function openDetialPage(url){ $("#listPage").hide();//隐藏列表 $("#detialPage").load(url,function(){ if($('#detialPage').height() < 720){ $('#iframe-main', parent.document).css('height', 720) }else{ $('#iframe-main', parent.document).css('height', $('#detialPage').height() + 40) } }); } // function openDetialPage(url){ // $("#listPage").hide();//隐藏列表 // $.ajaxSetup ({ // cache: false // }); // $.ajax({ // url: url, // type: 'get', // data: "", // beforeSend: function (XMLHttpRequest) { // loadingFlag = layer.load(); // }, // success: function (data) { // layer.close(loadingFlag); // $("#detialPage").html(data); // } // }) // $("#detialPage").load(url,function(){ // scrollBar(); // }); // } // 详情返回列表函数 function goback(url){ // console.log($("#listPage").length) if($("#listPage").length){ $("#detialPage").empty(); $("#listPage").show();//显示列表 if($('#listPage').height() < 720){ $('#iframe-main', parent.document).css('height', 720) }else{ $('#iframe-main', parent.document).css('height', $('#listPage').height() + 20) } }else{ location.href = url; // window.history.back(-1) } } // 滚动条 function scrollBar() { if($('.content').height() < 720){ $('#iframe-main', parent.document).css('height', 720); }else{ $('#iframe-main', parent.document).css('height', $('.content').height() + 20) } }