| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //打开详情
- 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)
- }
- }
|