I am new to jQuery. Basically I have a main page (with jQuery) and I want to include in a div another page that also has jQuery.
What I do is write in that particular div this code:
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/ong/new/index.php";
include_once($path);
?>
If I do this the jQuery in the child page stops working. The jQuery functions in the main page also stops working, but if I remove this link
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
from the child page it works in the main page.
So, what am I doing wrong? How should you include a jQuery page in another?
It is because you are including jQuery multiple times. You could make small script to check if jQuery is present on the page, and only if is not present, load it: