create the div wrapper over group of p tags

on with Leave a reply

Using jquery function wrap, we can create the div wrapper over p tag. But we expecting to create the wrap for group of p tags. So wrapAll function is the most useful function to do the task.

Example:

  <p>Lorem..</p>
  <p>Lorem..</p>
  <p>Lorem..</p>  

$('p').wrapAll('<div class="column"/>');

Result:

<div class="column"> 
  <p>Lorem..</p>
  <p>Lorem..</p>
  <p>Lorem..</p>   
</div>
Posted on by .

About Gowri

I am professional web developer with 4+ years experience. PHP, jQuery, WordPress, Magento and Symfony2 are my key skills in web development. I am working with strong enthusiastic team with spirit. We provide all web related solution like HTML/CSS development, Web graphic design and Logo.

Leave a Reply

Your email address will not be published. Required fields are marked *