JSFiddle - React, Tailwind, and code Playground
by sparebytes
HTML
<input type="text" id="link" /><button id="addLink">Add</button>
<ol>
</ol>
JavaScript
jQuery(function($){
var $inputLink = $('#link');
var $addButton = $('#addLink');
var $ol = $('ol');
$ol.on('click', 'input[type=checkbox]', function() {
var $cb = $(this);
$inputLink.val($cb.next().attr('href'));
$cb.parent().remove();
});
$addButton.on('click', function() {
$ol.append('<li><input type="checkbox" /><a target="_blank" href="'+ $inputLink.val() +'">'+ $inputLink.val() +'</a>');
$inputLink.val('');
});
});