Category Archives: JQuery

Insert html code into a div using JQuery

When you want to insert a certain HTML code into one DIV you can use the following html code: html> <head> <title>Header&Footer import</title> <script src=”jquery-latest.js” type=”text/javascript”></script> <script type=”text/javascript”> function loadContent(id) { $(“#copy_header”).load(“http://mydomain.com/header.htm”); $(“#copy_footer”).load(“http://mydomain.com/footer.htm”); } </script> </head> <body onLoad=”loadContent();”> <div id=”copy_header” style=”width: 1000px; height: 150px;”> Header is loading.. </div> Lorem Ipsum is simply dummy text of… Read More »