Permalink
Browse files

Listview: Check if list item is already enhanced to improve performan…

…ce of refresh.
  • Loading branch information...
jaspermdegroot committed May 16, 2013
1 parent aabdc93 commit e07be5ad8ceef4917351bb4bc8a5ac9330a5c27f
Showing with 2 additions and 3 deletions.
  1. +2 −3 js/widgets/listview.js
View
@@ -101,14 +101,13 @@ $.widget( "mobile.listview", $.mobile.widget, $.extend( {
item = li.eq( pos );
itemClass = "";
// TODO: Better way than !item.is( ".ui-listview > li" ) to prevent re-enhancemeent.
if ( create || !item.is( ".ui-listview > li" ) ) {
if ( create || item[ 0 ].className.search( /\bui-li-/ ) < 0 ) {
a = this._getChildrenByTagName( item[ 0 ], "a", "A" );
isDivider = ( getAttr( item[ 0 ], "role", true ) === "list-divider" );
value = item.attr( "value" );
itemTheme = getAttr( item[ 0 ], "theme", true ) || o.theme;
if ( a.length && !isDivider ) {
if ( a.length && a[ 0 ].className.search( /\bui-btn\b/ ) < 0 && !isDivider ) {
itemIcon = getAttr( item[ 0 ], "icon", true );
icon = ( itemIcon === false ) ? false : ( itemIcon || o.icon );

0 comments on commit e07be5a

Please sign in to comment.