2013-05-20 55 views
0

我需要在iframe照片上打開prettyphoto燈箱,現在如果我在iframe中實現下面的代碼,那麼它將顯示在iframe範圍內。我需要在主頁面而不是iframe中打開燈箱。jquery Prettyphoto/colorbox/fancybox/stickytooltip iframe需要在主頁面打開的所有燈箱

$(document).ready(function(){ load(); 
    $("a[rel^='prettyPhoto']").prettyPhoto(); 
}); 

<a href="<%=displayImageUrl%>" id="mainImgA" target="_blank" rel="prettyPhoto"> 
<img src="<%=displayImageUrl%>" id="mainimg" width="235" height="180" /></a> 

回答

0

我想你是指一個新的窗口,而不是iframe。要防止在新窗口中打開,請從代碼中移除{target =「_ blank」}。

+0

我已經嘗試刪除目標=「_ blank」,但仍然不工作.. – Sweety