jQuery > Attribute related method

.append() - Append content to element in jQuery

How to append html content to the element in jQuery?


To append html content to a particular element, jQuery append() method can be used.

<script>
      $("#div2").append(" | This is a good <i>boy</i>");
  </script>

Above code snippet will append the specified text ( | This is a good boy) in the html element whose id is “div2”.

 Views: 5336 | Post Order: 30



Write for us






Hosting Recommendations