From 9f53e4e403b37ad00ccdb421a1eae4f835065ca1 Mon Sep 17 00:00:00 2001 From: John Bender Date: Thu, 17 Mar 2011 00:13:48 -0700 Subject: [PATCH] added mobile ns, jqdata was throwing an exception --- js/jquery.mobile.listview.filter.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.listview.filter.js b/js/jquery.mobile.listview.filter.js index 4741e531..4244a492 100644 --- a/js/jquery.mobile.listview.filter.js +++ b/js/jquery.mobile.listview.filter.js @@ -11,6 +11,7 @@ $.mobile.listview.prototype.options.filter = false; $( "[data-" + $.mobile.ns + "role='listview']" ).live( "listviewcreate", function() { var list = $( this ), listview = list.mobileData( "listview" ); + if ( !listview.options.filter ) { return; } @@ -33,7 +34,7 @@ $( "[data-" + $.mobile.ns + "role='listview']" ).live( "listviewcreate", functio for (var i = listItems.length; i >= 0; i--) { item = $(listItems[i]); - if (item.is("li[data-role=list-divider]")) { + if (item.is("li[data" + $.mobile.ns + "role=list-divider]")) { if (!childItems) { item.hide(); } @@ -51,10 +52,10 @@ $( "[data-" + $.mobile.ns + "role='listview']" ).live( "listviewcreate", functio .appendTo( wrapper ) .textinput(); - if ($( this ).data( "inset" ) ) { + if ($( this ).mobileData( "inset" ) ) { wrapper.addClass( "ui-listview-filter-inset" ); } - + wrapper.insertBefore( list ); });