i have a web page with a fix header included by a simple include("header.php"), in this header i have a jquery function that begins with: $(document).ready(function() {. One of my pages, need to have another jquery function on the body, if i put two times in the same page the function $(document).ready(function() { one of them stop to work. How can i handle this?, as you can see i cant put the scripts on the same position because one have to be always on the header and the other one appear only in some pages. Thanks!
i have a web page with a fix header included by a simple include(header.php)
Share
jQuery handles multiple event handlers, so there is nothing that keeps you from having multiple
readyevent handlers.Demo: http://jsfiddle.net/VysPB/
There has to be something inside the event handlers that keeps them from working in the same page.