Home  >  Forum  >  JavaScript
Post New Query

How to Append Html Code Using jQuery


joined on
November 18,2013
Asked on June 12,2014
I need to appned some html code somewhere in my webpage.
There are lots of pages, so I do not want to choose 
doing chnages in each and every pages.

I want to use jQuery to do it.

Can someone provide jQuery code
to acheive it.

joined on
March 05,2015
Replied on March 05,2015

Append Html Code Using jQuery


<html">
<head>
<title>Red Passion</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function(){   
$("#employer").click(function(){
$("#content1").load("Employer.jsp");
});
});
</script>
</head>
<body>
     <ul>
        <li><a href="#"><span id="employer">Employer</span></a></li>
      </ul>
    <center><div id="content1">
      
        </div></center>
    </body>
</html>

Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us