JSFiddle - React, Tailwind, and code Playground
by fparent
HTML
<div id="plus-link"></div>
JavaScript
var options = {
'text' : 'text',
'select': 'select',
'checkbox' : 'checkbox',
'textarea' : 'textarea'
}
var select = $('<select></select>').attr('name', 'type[]').attr('class','type');
$.each(options,function(key,value) {
select.append('<option value="'+key+'">' + value +'</option>');
});
var wrapper = $('<div></div>').attr('class','element-wrapper');
//wrapper.insertBefore('#plus-link');
wrapper.append(select);
$('#content').append(wrapper);