append for found element - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:append

Description

append for found element

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//from   www. j a va  2 s. co m
$('#parent').append('Text inside div');
    });

      </script> 
 </head> 
 <body> 
  <div id="parent"> 
   <strong> 1</strong> 
  </div> 
  <div id="parent"> 
   <strong>2</strong> 
  </div>  
 </body>
</html>

Related Tutorials