I'm new to jQuery mobile. I want to be able to sort listview items by pricing (low-high, for example) when a button is clicked. I can't seem to find anything online on how to do it in jQuery mobile. I'm aware there's tiny sort plugin, but I need to write the method myself.
This is a sample of my listview.
<ul data-role="listview" data-filter="true" data-input="#searchpostcode" class="searchable">
<li class="british fish low-budget"><a href="#">
<img src="images/fishandchips.png" class="ui-li-thumb">
<h4>Fish and Chips</h4>
<p>British cuisine, contains fish</p>
<p class="ui-li-aside">£6.00</p>
</a>
</li>
<li class="spanish high-budget"><a href="#">
<img src="images/paella.png" class="ui-li-thumb">
<h4>Seafood Paella</h4>
<p>Spanish cuisine, contains seafood</p>
<p class="ui-li-aside">£8.00</p>
</a>
</li>
<li class="american medium-budget"><a href="#">
<img src="images/burger.png" class="ui-li-thumb">
<h4>Beef Burger</h4>
<p>American burger</p>
<p class="ui-li-aside">£7.00</p>
</a>
</li>
</ul>
Is there an easy way to do it? Any guidance will be appreciated, thanks.