add header scripts in a php web page? - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:jQuery Method Example

Description

add header scripts in a php web page?

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://code.jquery.com/jquery-1.10.2.js"></script> 
   </head>//w  w w .  j av  a2 s.  co  m
   <body>
      <div id="header"></div>
       //add header.php   
      <div id="footer"></div>
       //add footer.php 
      <script>
  $(document).ready(function(){
  $('#header').load('header.html');
  $("#footer").load("footer.html");
  });
  
      </script>  
   </body>
</html>

Related Tutorials