Skip to content Skip to sidebar Skip to footer

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:

  1. 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
  2. Modify the loadList() function so that you write out an img tag as part of your HTML, using the URI passed-in from your JSON as that image tag's src attribute.

Post a Comment for "Adding Images To A Json Array"