I am trying to make a all in one script, but I can not seem to make the pop up selector work with the add image function on the img tag id="example' + image_row + '"
How would it be possible to get the pop up selector so can pic up id="example' + image_row + '"
var image_row = ;
function addImage() {
html = '<tr id="image-row' + image_row + '">';
html += '<td>';
html += '';
html += '</td>';
html += '<td>';
html += '';
html += '</td>';
html += '<td>';
html += '<img src="" class="img-thumbnail" id="example' + image_row + '" style="width: 100px; height:100px; cursor: pointer;">';
html += '</td>';
html += '</tr>';
$('#images tbody').append(html);
image_row++;
}
$(document).ready(function() {
$('body').popover({
selector: '#example + image_row + ',
placement: 'right',
html: 'true',
content : '<span class="btn btn-primary btn-file"><i class="fa fa-pencil"></i> <input onchange="readURL(this)" id="file-input" type="file" name="userfile[]"/></span>'
});
});