Insert delimiters after each element - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:each

Description

Insert delimiters after each 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.6.4.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from   w ww.  java2  s .c om*/
$(function() {
    $("<span>|</span>").insertAfter($('#divLinks a:not(:last)'));
});
    });

      </script> 
 </head> 
 <body> 
  <div id="divLinks"> 
   <a href="">One</a> 
   <a href="">two</a> 
   <a href="">three</a> 
  </div>  
 </body>
</html>

Related Tutorials