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.

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

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

 Views: 1657 | Post Order: 30

Write for us

Hosting Recommendations