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.
This commit is contained in:
Kin Blas 2010-09-27 11:39:57 -07:00
parent 0a2a82102e
commit 0717106b94

View file

@ -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');