javascript - deleting parent which deleting child jquery -


i want delete parent div , keep children :

      <div id="main">         <div id="1"></div>         <div id="2"></div>       </div> 

how can delete #main div without deleting children div #1 & #2?. tried detach() didn't work.

try unwrap().

​$('#main div')​.unwrap();​​​​​​​​​​ 

jsfiddle example.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -