include HTML sidebar in an HTML page? - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:html

Description

include HTML sidebar in an HTML page?

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
      <script>
    $(function(){//from w  ww .j a v  a 2 s . c  om
      $("#sidebar").load("sidebar.html");
    });
    
      </script> 
   </head> 
   <body> 
      <!-- other content here --> 
      <div id="sidebar"></div> 
      <!-- other content here -->  
   </body>
</html>

Related Tutorials