mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-31 21:20:23 +00:00
Ajax should be disabled instead
This commit is contained in:
parent
3f522a2bce
commit
aa8b0b7cfd
1 changed files with 13 additions and 9 deletions
|
|
@ -55,12 +55,16 @@ $(function(){
|
|||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
if ( location.protocol.substr(0,5) === 'file:' ) {
|
||||
$('a, input[type="submit"], form').attr('data-ajax', false)
|
||||
.filter('a')
|
||||
.filter('[href="../"]').attr('href', '../index.html').end()
|
||||
.filter('[href="../../"]').attr('href', '../../index.html').end()
|
||||
.filter('[href="../../../"]').attr('href', '../../../index.html').end();
|
||||
}
|
||||
});
|
||||
// Turn off AJAX for local file browsing
|
||||
if ( location.protocol.substr(0,5) === 'file:' ) {
|
||||
$( function() {
|
||||
$( "a" )
|
||||
.filter( "[href='../']" ).attr( "href", "../index.html" ).end()
|
||||
.filter( "[href='../../']" ).attr( "href", "../../index.html" ).end()
|
||||
.filter( "[href='../../../']" ).attr( "href", "../../../index.html" );
|
||||
});
|
||||
$( document ).bind( "mobileinit", function() {
|
||||
$.mobile.ajaxEnabled = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue