Prepend content to the inside of every matched element : prepend « jQuery « JavaScript DHTML






Prepend content to the inside of every matched element

    
<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
             $("span").prepend("<b>Hello </b>");


        });
    </script>
  </head>
  <body>
    <body>
        <span>span</span>
        <div id="foo">FOO!</div>

  </body>
</html>

   
    
    
    
  








Related examples in the same category

1.Add data to each tag with prepend
2.Prepend query
3.Prepends a DOM Element
4.prepend(content): insert elements inside
5.Prepends some HTML to all paragraphs.
6.Prepends a DOM Element to all paragraphs.