mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-28 03:30:27 +00:00
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:
parent
0a2a82102e
commit
0717106b94
1 changed files with 3 additions and 1 deletions
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue