quick fix to listview image selector to grab the first img of each LI, not the whole list.

This commit is contained in:
scottjehl 2011-03-24 15:41:43 -04:00
parent c25829a8a2
commit 4fa2032789

View file

@ -128,7 +128,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
item.find( "p, dl" ).addClass( "ui-li-desc" );
$list.find( "li" ).children( "img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() {
$list.find( "li" ).find( ">img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() {
$( this ).closest( "li" )
.addClass( $(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
});