Loading page within an allready loaded jquery page!
<p>i was wondering whether it is possible to load a second page from a already loaded page using jquery, </p>

<p>i have already done loading the first page, in this case its a gallery i can load all the images i want as thumbs now what i want is to click on em and a pop window that will show image details, i have the script for the pop window too, but when i combine the pop window with the gallery loaded with jquery the pop doesn't work .</p>

<pre><code>&lt;a href="detail.php?iid='.$iid.'" class="ajax"&gt;&lt;img name="" style="margin:2px;" src="image.php?width=100&amp;height=100&amp;cropratio=2:2&amp;amp;image=/u/'.$file.'"  alt="" /&gt;&lt;/a&gt;


&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css" type="text/css" /&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"&gt;&lt;/script&gt;



&lt;script type="text/javascript"&gt;
$(function (){
    $('a.ajax').click(function() {
        var url = this.href;
        var dialog = $('&lt;div style="display:hidden"&gt;&lt;/div&gt;').appendTo('body');
        // load remote content
        dialog.load(
            url, 
            {},
            function (responseText, textStatus, XMLHttpRequest) {
                dialog.dialog();
            }
        );
        //prevent the browser to follow the link
        return false;
    });
});
&lt;/script&gt;
</code></pre>

<p>as u can see the detail.php gets the imageid through url property, this dose work when i use it the direct gallery.php, the problem only comes when i load gallery.php using jquery though the index.php. </p>

<p>here is the script to load gallery.php using index.php file.. </p>

<pre><code>$(document).ready(function()
        {
            $("#gl").click(function()
            {
                //$(this).text("...One Moment Please...");
                $("#container").append('&lt;div id="glr" "&gt;&lt;/div&gt;')
                .children("#glr").hide()
                .load("gallery.php div#glr", function()
                {
                $("#tet").remove();
                $("#rem").remove();
                $("#glr").slideDown("slow");
                });
                return false;
            });
        }); 
</code></pre>

<p>as u can see in the bellow pic, when i go directly to gallery.php it works. </p>

<p><a href="http://i.stack.imgur.com/Gyf4A.png" rel="nofollow">http://i.stack.imgur.com/Gyf4A.png</a></p>

<p>this the gallery.php when loaded through index.php with jquery.</p>

<p><a href="http://i.stack.imgur.com/oqVce.png" rel="nofollow">http://i.stack.imgur.com/oqVce.png</a></p>

<p>i wont the pop detail.php to pop when i load gallery.php ..</p>

<p>any feedbacks will be greatly appreciated, </p>

<p>ThankYou 
M.Amin</p>
