File tree Expand file tree Collapse file tree 3 files changed +15
-19
lines changed
Expand file tree Collapse file tree 3 files changed +15
-19
lines changed Original file line number Diff line number Diff line change 2222 etargets . push ( e . target ) ;
2323 } ) ;
2424
25- $ ( "#c " ) . live ( "pagebeforecreate" , function ( e ) {
25+ $ ( "body " ) . on ( "pagebeforecreate" , "#c ", function ( e ) {
2626 cEvents . push ( e . type ) ;
2727 cTargets . push ( e . target ) ;
2828 return false ;
116116
117117 $ . mobile . ignoreContentEnabled = false ;
118118 } ) ;
119-
120-
119+
120+
121121 asyncTest ( "page container is updated to page theme at pagebeforeshow" , function ( ) {
122-
122+
123123 expect ( 1 ) ;
124-
124+
125125 var pageTheme = "ui-overlay-" + $ . mobile . activePage . page ( "option" , "theme" ) ;
126126
127127 $ . mobile . pageContainer . removeClass ( pageTheme ) ;
128-
128+
129129 $ . mobile . activePage
130130 . bind ( "pagebeforeshow" , function ( ) {
131131 ok ( $ . mobile . pageContainer . hasClass ( pageTheme ) , "Page container has the same theme as the page on pagebeforeshow" ) ;
134134 . trigger ( "pagebeforeshow" ) ;
135135
136136 } ) ;
137-
137+
138138 asyncTest ( "page container is updated to page theme at pagebeforeshow" , function ( ) {
139-
139+
140140 expect ( 1 ) ;
141-
141+
142142 var pageTheme = "ui-overlay-" + $ . mobile . activePage . page ( "option" , "theme" ) ;
143143
144144 $ . mobile . pageContainer . addClass ( pageTheme ) ;
145-
145+
146146 $ . mobile . activePage
147147 . bind ( "pagebeforehide" , function ( ) {
148148 ok ( ! $ . mobile . pageContainer . hasClass ( pageTheme ) , "Page container does not have the same theme as the page on pagebeforeshow" ) ;
151151 . trigger ( "pagebeforehide" ) ;
152152
153153 } ) ;
154-
155-
156-
154+
155+
156+
157157} ) ( jQuery ) ;
Original file line number Diff line number Diff line change 3232</ head >
3333< body >
3434
35- < h1 id ="qunit-header "> jQuery Mobile Widget Test Suite</ h1 >
36- < h2 id ="qunit-banner "> </ h2 >
37- < h2 id ="qunit-userAgent "> </ h2 >
38- < ol id ="qunit-tests ">
39- </ ol >
35+ < div id ="qunit "> </ div >
4036
4137< div id ="qunit-fixture ">
4238
Original file line number Diff line number Diff line change 66
77 module ( 'jquery.mobile.widget.js' ) ;
88
9- $ ( "#foo" ) . live ( 'pageinit' , function ( ) {
9+ $ ( document ) . on ( 'pageinit' , "#foo" , function ( ) {
1010 // ordering sensitive here, the value has to be set after the call
1111 // so that if the widget factory says that its not yet initialized,
1212 // which is an exception, the value won't be set
You can’t perform that action at this time.
0 commit comments