我想知道是否有可能使用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