I manipulated some html to display a little form in a modal bootstrap like this :
$.each(response, function(i, item){
detail += "<div><input name='detail-tipe' type='checkbox' value='" + response[i].nama_detail + "' class='detail-tipe' /> " + response[i].nama_detail.toString() + "</div>";
});
detail += "$('.detail-tipe').each(function(){
var attrib = $(this).attr('value');
for ( var j=0, k = remo.length; j < k; j++ ) {
if(attrib == remo[j]){
$(this).attr('checked', 'checked');
};
}
})";
But, dollar sign is unterminated. Is it possible Please, advise.