I am trying to reuse an HTML snippet to fill an array of JSON data. The following piece of HTML is somewhere hidden (eg. css: #empty { display: none; } in the page. This block basically defines the HTML structure of LI tags.
<ul id="empty">
<li class="h1">
<img class="icon" src="#link" />
<a href="#link">NAME</a>
<span class="count">TOTAL</span>
</li>
</ul>
Now, how can I fill up the image src, href, anchor text and TOTAL value in jQuery?
