Adding Images To A Json Array
I have a JSon array that displays in a JQuery Mobile list. It shows the description + price, but I'd like to add a picture Icon to the left. Any pointers on how I could achieve tha
Solution 1:
You're writing out an HTML list derived from a JSON array. So, one suggestion for achieving what you want:
- Modify the JSON produced so that instead of the
brand
text you have in there at the moment, you provide the URI for the relevant image - Modify the
loadList()
function so that you write out animg
tag as part of your HTML, using the URI passed-in from your JSON as that image tag'ssrc
attribute.
Post a Comment for "Adding Images To A Json Array"