JSFiddle - React, Tailwind, and code Playground
HTML
<b>Try Scorers</b><a href="#" class="add-player" id="add">Add</a><div class="info-hide"><p><i>For each try scored, select a player and the amount.</i></p></div><div id="selextender"></div>
JavaScript
$(function() {
$('a#add').click(function() {
$('.info-hide').hide();
$('<p><select name="count[]" style="margin-right:7px;width: 30px;"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select><select name="items[]" class="required" style="margin-left: 0px;width: 145px;"><option value="">Select Player</option><option value="Tim Brown">Tim Brown</option><option value="Bobby Duppree">Bobby Duppree</option><option value="Matt Harold">Joe Bloggs</option></select><a href="#" class="remove-player">Remove</a></p>').fadeIn("fast").appendTo('#selextender');
return false;
});
$('.remove-player').live('click', function() {
$(this).parent().fadeOut("fast", function() {
$(this).remove();
if ($('#selextender').children().length == 0) {
$('.info-hide').show();
}
return false;
});
});
});