JQuery unwrap content - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:unwrap

Description

JQuery unwrap content

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from  ww  w .ja  v a 2s.  com
$('h2 a').contents().unwrap();
    });

      </script> 
   </head> 
   <body> 
      <h2> 
         <a href="...">Title</a> 
      </h2> 
      <h2> 
         <a href="...">Other Title</a> 
      </h2>  
   </body>
</html>

Related Tutorials