added logic and example for "ui-li-aside" content within listview

This commit is contained in:
scottjehl 2010-09-16 16:10:31 -04:00
parent 3acb95e0f8
commit a39b366df4
2 changed files with 26 additions and 0 deletions

View file

@ -79,6 +79,8 @@
</li>
</ul>
<h2 class="ui-bar ui-bar-b">Basic Listview w/ hierarchy:</h2>
<ul data-role="listview">
@ -102,6 +104,26 @@
<h2 class="ui-bar ui-bar-b">Basic Listview w/ grouped aside content:</h2>
<ul data-role="listview">
<li>
<h3><a href="index.html">Page A</a></h3>
<p>Quick description about this item here...</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
<li>
<h3><a href="index.html">Page A</a></h3>
<p>Quick description about this item here...</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
<li>
<h3><a href="index.html">Page A</a></h3>
<p>Quick description about this item here...</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
</ul>
<h2 class="ui-bar ui-bar-b">Basic Listview w/ thumbnails:</h2>
<ul data-role="listview">

View file

@ -69,6 +69,10 @@ $.fn.listview = function( options ) {
if ( $li.is( ":has(img)" ) ) {
$li.addClass( "ui-li-has-thumb" );
}
if ( $li.is( ":has(.ui-li-aside)" ) ) {
var aside = $li.find('.ui-li-aside');
aside.prependTo(aside.parent()); //shift aside to front for css float
}
$li
.addClass( "ui-li" )
.buttonMarkup({