Skip to content

Commit 3571bed

Browse files
committed
switch live to on
1 parent e497aa2 commit 3571bed

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

tests/unit/page/page_core.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
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;
@@ -116,16 +116,16 @@
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" );
@@ -134,15 +134,15 @@
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" );
@@ -151,7 +151,7 @@
151151
.trigger( "pagebeforehide" );
152152

153153
} );
154-
155-
156-
154+
155+
156+
157157
})(jQuery);

tests/unit/widget/index.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@
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

tests/unit/widget/widget_init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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

0 commit comments

Comments
 (0)