Skip to content
This repository
Browse code

Eeking out another 200+ msecs (on iPad) by simply switching to childr…

…en("img:eq0") instead of find(">img:eq0"). Still need to figure out how to get rid of the find(".ui-link-inherit>img:eq(0)") which is the where the bulk of listview enhancement is spent on WP7.
  • Loading branch information...
commit e17e29b559bee2860a6244cdecb7372167d9aa83 1 parent d194476
Kin Blas authored November 07, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  js/jquery.mobile.listview.js
2  js/jquery.mobile.listview.js
@@ -210,7 +210,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
210 210
 					$( this ).closest( "li" ).addClass( "ui-li-has-count" );
211 211
 				}).addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" );
212 212
 
213  
-		li.find( ">img:eq(0), .ui-link-inherit>img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() {
  213
+		li.find( ".ui-link-inherit>img:eq(0)" ).add( li.children( "img:eq(0)" ) ).addClass( "ui-li-thumb" ).each(function() {
214 214
 					var $this = $( this );
215 215
 					$this.closest( "li" ).addClass( $this.is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
216 216
 				});

0 notes on commit e17e29b

Please sign in to comment.
Something went wrong with that request. Please try again.