jQuery Add Div To Body Examples

  Buffer

While working with different elements, especially divs and DOM manipulation,  there may have been times when you wanted to add a div to body of the web page? So do know how to add div to the html body of a web page using jQuery? If not, this article is for you. In this article, I am going to share very easy examples to use jQuery to add div to body.

How to use jQuery add div to body

Let’s assume that we have a web page  with the standard “body” in it. We would now like to add a div to this body. The following example shows you how to do it easily:

Example – Add a div to body using jQuery

When you run the above code, simply click on the Add button to add the div to body. To remove it, you can use the code associated with the Reset button.

Simple, isn’t it?

Do you know of any other ways to use jQuery to add div to body? Feel free to suggest by commenting below.

a You May Also Like

m Never Miss A Post

We will send you FREE periodical updates whenever we publish a new article so that you can remain on top of technology. We will NEVER send unsolicited email. That’s our GUARANTEE !!!

The above article has the following Categories and Tags applied to it:
B Categories: jQuery, Tips and Tricks
About the Author

f About Author:

Founder of Extreme Web Designs and currently works as Web Designer, Web Developer, Blogger and as an Editor. He is the brains behind the Extreme Web Designs Labs, a one-stop growing resource for Free Web Design & Web Development tools that help increase productivity and cut down on web design & development time. Connect with Rocky Dev on G+ and follow him on Twitter.

Y U No Comment? Say Something Useful!

*


Refresh Code

*

*

Get more traffic, increase your profits with our services
Get FREE Website Design and Web Development Quote!
Visit Extreme Web Design's Labs for more Free tools!