2014-04-15 41 views
0

我試圖打開谷歌地圖爲顏色框燈箱,但它不工作。我嘗試過的一些解決方案,我已經在谷歌搜索中找到,但他們沒有工作給我。彩盒不開放

這裏是我的代碼部分:

<html> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
     <script type="text/javascript" src="js/jquery-1.10.2.js"></script> 
     <script type="text/javascript" src="js/jquery.dataTables.min.js"></script> 
     <script type="text/javascript" src="js/jquery-ui-1.10.4.custom.min.js"></script> 
     <link rel="stylesheet" type="text/css" href="css/jquery.dataTables.css"/> 
     <link rel="stylesheet" type="text/css" href="css/jquery-ui-1.10.4.custom.min.css"/> 
     <link rel="stylesheet" type="text/css" href="css/jquery.dataTables_themeroller.css"/> 
     <link rel="stylesheet" type="text/css" href="css/colorbox.css"> 
     <script type="text/javascript" src="js/jquery.colorbox-min.js"></script> 

,然後調用彩盒...

$(document).on("click", "a", function(){ 
    $('.link').colorbox({iframe:true, width:"80%", height:"80%"}) 
}); 

始終鏈接打開了當前頁面上,但沒有顯示彩盒。這裏是鏈接的頁面:http://www.atcbsb.com.br/radar

任何幫助將不勝感激。

回答

0

固定......我意識到,鏈接由數據表中創建的,所以我改變了顏色框調用函數以下幾點:

$(document).ajaxSuccess(function(e){ 
     $('a.link').colorbox({iframe:true, width:"80%", height:"80%"});   
     }); 
0

我有簡單的解決方案,ü 只是調用jQuery函數從你的錨標記。 jquery調用colorbox。 見下面的例子

//script 
<script type="text/javascript"> 

function colorboxFunc(currentId) 
{ 
    $("#"+currentId).colorbox({iframe:true, width:"60%", height:"100%"}); 
} 
</script> 


//html anchor tag 

<a id="putHereDynamicID" href="Your Pop Page Link" onclick="colorboxFunc(this.id);" >Click Here To See Pop Up</a>