Remove specific href children jquery - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:unwrap

Description

Remove specific href children jquery

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>  Dawid Gos?awski</title> 
 </head> // w  w  w  .  ja  va  2s . c o  m
 <body translate="no"> 
  <a class="cls" href="http://index.php?eID=my"> 
   <div>
     ASD 
   </div> </a> 
  <br> 
  <button onclick="unwrap()">UNWRAP</button> 
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 
  <script>
      function unwrap(){
$(".cls[href*='//index.php?eID']").children('div').unwrap();
}

    
      </script>  
 </body>
</html>

Related Tutorials