How to remove the parent elements of any object


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /* here we locate any paragraph elements and then
  2. 'unwrap' the parent elements around them. These
  3. could be other divs, spans or anything really */
  4.  
  5. jQuery('p').unwrap();
  6.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.