I have a responsive page created by jquery, php and ajax. The same page loads content from another php page based on the selected LI. I have this working fine. The php page includes other php pages depending on the LI selected. Do i need to include the CSS & jquery on all the php pages too? Including the script path in all the pages makes the response very slow.
Main Page:
<UL>
<li>1</li>
<li>2</li>
<li>3</li>
<UL>
PHP page where the LI selection is checked and includes the other php page:
if(isset($_POST['li'])){
$li = $_POST['li'];
if($li=='1'){
include 'other1.php'
}
if($li=='2'){
include 'other2.php'
}
}
other1.php :
<div id="otherdiv1">
click functions to do something . Functions included in jquery defined in MainPage.
</div>
<div id="otherdiv2">
</div>
The other1.php is listed properly in the Main Page but does not do the onclick functions unless jquery is included in other1.php too.
Including the jquery path and jquery scripts path in every page is making the response very slow.
Is there any easy way around this?