Ajax should be disabled instead

This commit is contained in:
Eddie Monge 2011-11-19 12:30:44 -08:00 committed by John Bender
parent 3f522a2bce
commit aa8b0b7cfd

View file

@ -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;
});
}