我想知道是否有可能使用jQuery加載從已加載頁第二頁,在已加載的jquery頁面中加載頁面!
我已經加載完成的第一頁,在這種情況下,它是一個畫廊,我可以加載所有我想要的圖像大拇指現在我想要的是點擊em和一個彈出窗口,將顯示圖像的細節,我也有彈出窗口的腳本,但是當我將彈出窗口與裝載了jQuery的彈出窗口結合時彈出窗口不起作用。
<a href="detail.php?iid='.$iid.'" class="ajax"><img name="" style="margin:2px;" src="image.php?width=100&height=100&cropratio=2:2&image=/u/'.$file.'" alt="" /></a>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function(){
$('a.ajax').click(function() {
var url = this.href;
var dialog = $('<div style="display:hidden"></div>').appendTo('body');
// load remote content
dialog.load(
url,
{},
function (responseText, textStatus, XMLHttpRequest) {
dialog.dialog();
}
);
//prevent the browser to follow the link
return false;
});
});
</script>
如u可以看到detail.php獲得通過url屬性的圖像標識,當我使用它的直接gallery.php這個劑量的工作,問題只是來當我使用jQuery雖然指數加載gallery.php .PHP。
這裏使用的index.php文件加載gallery.php腳本..
$(document).ready(function()
{
$("#gl").click(function()
{
//$(this).text("...One Moment Please...");
$("#container").append('<div id="glr" "></div>')
.children("#glr").hide()
.load("gallery.php div#glr", function()
{
$("#tet").remove();
$("#rem").remove();
$("#glr").slideDown("slow");
});
return false;
});
});
爲u可以在波紋管PIC看到,當我直接去gallery.php它的工作原理。
http://i.stack.imgur.com/Gyf4A.png
此當通過與jquery的index.php加載gallery.php。
http://i.stack.imgur.com/oqVce.png
我不會彈出detail.php當我加載gallery.php彈出..
任何反饋將不勝感激,
THANKYOU M.Amin
生活dosent工作要麼我loa d使用jquery的圖庫頁面,直接運行,基本上仍然是一樣的東西。 – amin 2011-03-27 00:42:11