From e17e29b559bee2860a6244cdecb7372167d9aa83 Mon Sep 17 00:00:00 2001 From: "jblas@adobe.com" Date: Mon, 7 Nov 2011 15:16:32 -0800 Subject: [PATCH] Eeking out another 200+ msecs (on iPad) by simply switching to children("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. --- js/jquery.mobile.listview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.listview.js b/js/jquery.mobile.listview.js index 2008827b..6ea44b9a 100644 --- a/js/jquery.mobile.listview.js +++ b/js/jquery.mobile.listview.js @@ -210,7 +210,7 @@ $.widget( "mobile.listview", $.mobile.widget, { $( this ).closest( "li" ).addClass( "ui-li-has-count" ); }).addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" ); - li.find( ">img:eq(0), .ui-link-inherit>img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() { + li.find( ".ui-link-inherit>img:eq(0)" ).add( li.children( "img:eq(0)" ) ).addClass( "ui-li-thumb" ).each(function() { var $this = $( this ); $this.closest( "li" ).addClass( $this.is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" ); });