jQuery and loading html/scripts
Hi,
I am loading sub pages in a website using jQuery using this code:
- function loadContent(htmlfile){
- jQuery("#content").load(htmlfile);
- };
When ever user clicks menu item, the related page gets loaded in a "div" whose id="content".
Some of the pages are using couple of jQuery based plugins such as jTip, LightWindow etc.
These scripts needs to be initialized. For example: to fix .png transparency issue, I am using:
- <script type="text/javascript" src="js/jquery.pngFix.pack.js"></script>
- <script type="text/javascript">
- jQuery.noConflict();
- jQuery(document).ready(function(){
- jQuery(document).pngFix();
- });
- </script>
My question is that where do you call/initialize these various scripts? Do you have to call/initialize all the scripts in "index.html"(Global) or call/initialize in the page where you are using it.(Local)
Keep in mind that all my pages are loaded in "div" which is the part of "index.html".
Thanks
Prashant