Load external image into dynamic list
How would I load an external image into a dynamic list within a post function? I see that it is not possible to just call <img src="foo"> as this will time out, but using a load and an append is the correct course of action. Can't wrap my head around how I could inject this into the list element with an append after a load function. I am trying to get an image to show within this one list element (eventually to the left of all the text). Looking for any help or suggestions on the best way to accomplish this - end state I am hoping for is similar to
this. What I am getting now is close to what I want, just need the actual image :b Thank you for any help!
- $.each(results, function(i,tasks){
- $('#taskDialogList').append('<li><img height="150" width="150" src="http://urlHere/uploadedPhotos/"' + tasks.image_url + '/><h4>Task: ' + tasks.text + '</h4><p>Created By: ' + tasks.created_by + '</p><p>Assigned To:' + tasks.assigned_to + '</p><br><p>Start Date: ' + tasks.start_date + '</p><p>Due Date: ' + tasks.due_date + '</li>');
- console.info(tasks.image_url);
- });
- $('#taskDialogList').listview('refresh');