Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
  
<ul class="telRow">
  <li id="telid_1234">
    ONE <button class="telRowRemove">-</button>
  </li>
</ul>
<div>
  <button class="telRowAdd">+</button>
</div>
<div id="errors">No errors</div>
<div class="emptyTel" style="display: none;">
<input type="text" name="tel_no[]" />
<button class="telRowRemove">-</button> 
</div>
 
$(document).ready(function(){
  $('.telRowAdd').on('click', function() {
     var Container = $('ul.telRow');
     var newrow = '<li>ONE <button class="telRowRemove">-</button></li>';
     Container.append(newrow);
      $('#errors').text('Added');
  });
  $(document).on('click','.telRowRemove',function() {
      $(this).parent().remove();
      $('#errors').text('Removed');
  });
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers