Javascript examples for jQuery Method and Property:append
Append to a <h1> tag inside a span with jQuery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.4.min.js"></script> <style id="compiled-css" type="text/css"> h1 {font-size:250%;color:red;} </style> <script type="text/javascript"> $(window).load(function(){/* w ww .jav a 2 s.co m*/ $('.note h1:first-child').append("more text"); }); </script> </head> <body> <span class="note"> <h1> some text </h1> </span> </body> </html>