From 0717106b948cf4f2ef9dab9de3975403cc8bbfbf Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Mon, 27 Sep 2010 11:39:57 -0700 Subject: [PATCH] Fixed issue 62: Multiple data-role="page" elements in a single document results in multiple markup insertion passes. The function used to iterate over all pages was making reference to th e$el variable passed into mobilize(). This meant it was executing the same operation over *ALL* pages several times, once for each page in the document. - Redefined $el in the funciton passed to the each() method. --- js/jQuery.mobile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/jQuery.mobile.js b/js/jQuery.mobile.js index a1697ff0..49da1a08 100644 --- a/js/jQuery.mobile.js +++ b/js/jQuery.mobile.js @@ -243,7 +243,9 @@ function mobilize($el){ //to-do: make sure this only runs one time on a page (or maybe per component) return $el.not('[data-mobilized]').each(function(){ - + + var $el = $(this); + //hide no-js content $el.find('[data-role="nojs"]').addClass('ui-nojs');