flavors.append(`<div class='col l6 flavor animated fadeIn'>
<div class='flavor-bottle'></div>
<div class='flavor-desrc'><div class='input-field'>
<input type='text' id='autocomplete-input' class='autocomplete' name='names[]'>
<label for='autocomplete-input'>name</label> </div> <div> <input name='group' type='radio' id='inPG' checked/>
<label for='inPG'>PG</label> <input name='group1' type='radio' id='inVG'/> <label for='inVG'>VG</label>
</div>
</div>
</div>`);
$(function () {
$('.child2').on('click', function (e) {
e.preventDefault();
$(this).parents('.parent').addClass('active');
});
});
$(document).click( function(event){
if(( $(event.target).closest(".parent").length ))
return;
$('.parent').removeClass('active');
event.stopPropagation();
});