Answer the question
In order to leave comments, you need to log in
How can appendTo image be correct?
var image = $($.parseHTML('<img width="50" height="50" style="margin-left: 10px; margin-bottom: 8px">')).attr('src', event.target.result);
ar imageSortable = '<li class="ui-state-default">' + image + '</li>';
imageSortable.appendTo(placeToInsertImagePreview);
Answer the question
In order to leave comments, you need to log in
image
jQuery element, object. You are concatenating a string imageSortable
with an object. imageSortable
string and string does not have a appendTo
.
var image = '<img src="'+ event.target.result +'" width="50" height="50" style="margin-left: 10px; margin-bottom: 8px">';
var imageSortable = '<li class="ui-state-default">' + image + '</li>';
placeToInsertImagePreview.append(imageSortable);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question