Skip to content

Commit 6785815

Browse files
author
Gabriel Schulhof
committed
Demos: h2widget: Fix typo and remove a pbc handler
1 parent 3473e25 commit 6785815

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

docs/demos/_assets/js/h2widget.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
}
1313
ele = $( this );
1414
});
15-
$( document ).on( "pagebeforechange", function( e, f ){
16-
f.originalHref = href;
17-
});
1815
$( document ).on("pagebeforechange", function( e,f ){
1916
var hash = $.mobile.path.parseUrl(f.toPage).hash;
2017
if( typeof hash !== "undefined" && hash.search( "/" ) === -1 && hash !== "" && $( hash ).length > 0 && !$( hash ).hasClass( "ui-page" ) && $(hash).data('role') !== "page" && !$( ".ui-page-active " + hash ).hasClass( "ui-panel" ) && !$( ".ui-page-active " + hash ).hasClass( "ui-popup" )){
@@ -23,7 +20,7 @@
2320
$.mobile.silentScroll( pos );
2421
$.mobile.navigate( hash, '', true );
2522
} else if( typeof f.toPage !== "object" && hash !== "" && $.mobile.path.parseUrl( f.originalHref ).hash !== "" && !$( hash ).hasClass( "ui-page" ) && $(hash).attr('data-role') !== "page" && !$( ".ui-page-active " + hash ).hasClass( "ui-panel" ) && !$( ".ui-page-active " + hash ).hasClass( "ui-popup" )){
26-
$( ele ).attr( href, f.originalHref );
23+
$( ele ).attr( "href", f.originalHref );
2724
$.mobile.document.one( "pagechange", function(){
2825
if( typeof hash !== "undefined" && hash.search( "/" ) === -1 && hash !== "" && $( hash ).length > 0 && !$( hash ).hasClass( "ui-page" ) && $(hash).data('role') !== "page" && !$( ".ui-page-active " + hash ).hasClass( "ui-panel" ) && !$( ".ui-page-active " + hash ).hasClass( "ui-popup" )){
2926
hash = $.mobile.path.parseUrl(f.originalHref).hash;
@@ -111,4 +108,4 @@
111108
$(e.target).h2linker();
112109
}
113110
});
114-
})( jQuery );
111+
})( jQuery );

docs/demos/_assets/js/view-source.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function makeButton() {
9292

9393
d.className = "jqm-view-source-link";
9494

95-
a.setAttribute( "href", "./" );
95+
a.setAttribute( "href", "#demoPopup" );
9696
a.setAttribute( "data-rel", "popup" );
9797
a.setAttribute( "data-role", "button" );
9898
a.setAttribute( "data-icon", "arrow-u" );

docs/demos/widgets/controlgroups/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,700' rel='stylesheet' type='text/css'>
1111
<script src="../../../../js/jquery.js"></script>
1212
<script src="../../_assets/js/"></script>
13+
<script>
14+
( function( $, undefined ) {
15+
$( document ).bind( "mobileinit", function() {
16+
$.mobile.ajaxEnabled = false;
17+
});
18+
})( jQuery );
19+
</script>
1320
<script src="../../../../js/"></script>
1421
</head>
1522
<body>

docs/pages/popup/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99

1010
<script src="../../../js/jquery.js"></script>
1111
<script src="../../../docs/_assets/js/jqm-docs.js"></script>
12+
<script>
13+
( function( $, undefined ) {
14+
$( document ).bind( "mobileinit", function() {
15+
$.mobile.ajaxEnabled = false;
16+
});
17+
})( jQuery );
18+
</script>
1219
<script src="../../../js/"></script>
1320

1421
</head>

0 commit comments

Comments
 (0)