Using nth-child to select element - Javascript jQuery Selector

Javascript examples for jQuery Selector:nth-child

Description

Using nth-child to select element

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.11.0.js"></script> 
   </head> 
   <body> 
      <dd> 
         <br> 
         <br> 
      </dd> 
      <script type="text/javascript">
   $('dd br:nth-child(1), dd br:nth-child(2)').remove();

      </script>  
   </body>/*from  ww w.j  ava  2s  .  com*/
</html>

Related Tutorials