Problem to call/use .js file (jquery function)
<p>I have this jq function to open a link inside a div:</p>

<pre><code>$(document).ready(function() {
    $('#all').delegate('a', 'click' (function() {
        $('#content').empty();
        var page = $(this).attr("id");
        $('#content').load("scripts/loop_a.php?page=" + page);
    });
});
</code></pre>

<p>I call this inside the head tag of my index.php and is working for all links that are in my header_template.php</p>

<p>If I load a new.php page inside my main_body div and it has a link inside, that link does not work with my script, (basically my new.php page doesn't see my .js file).</p>

<p>Is there a way to make it work for any new .php file that I open by calling the .js file only in my index.php?</p>

<p>Thank you</p>

<p>Edit... Solution Found... I edided the script above.</p>

<p>In my index.php I am using  which includes everything that happens.
So I just chose that div and I delegate all the functions that I needed to work when loading/opening new.php files.</p>

<p>Thank you all for your help.</p>
