Adding image to a jquery mobile list view

You can add an image to a list view in jquery mobile very easily.

The list view default code is as follows :

<ul data-role="listview" data-inset="true" data-split-icon="arrow-r">
	<li>
<h3>Page</h3>
Lorem ipsum
<span class="ui-li-count">1</span>
<a href="#">Default</a></li>
</ul>

To the above code, simply insert the image.

 

<ul data-role="listview" data-inset="true" data-split-icon="arrow-r">
     <li>
       <a href="#">
         <img alt="image" src="images/image.jpg" />
       </a>
       <h3>Page</h3>
       Lorem ipsum
       <span class="ui-li-count">1</span>
      <a href="#">Default</a></li>
</ul>
&nbsp;

Cheers..!!

Leave a Reply

Your email address will not be published. Required fields are marked *