Allow local browsing of the docs without a web server

This commit is contained in:
Eddie Monge 2011-11-19 11:29:20 -08:00 committed by John Bender
parent 2b40784c4e
commit 3f522a2bce

View file

@ -30,7 +30,7 @@ $('div').live('pagecreate',function(event){
//collapse page navs after use
$(function(){
$('body').delegate('.content-secondary .ui-collapsible-content', 'click', function(){
$(this).trigger("collapse")
$(this).trigger("collapse");
});
});
@ -52,4 +52,15 @@ function setDefaultTransition(){
$(function(){
setDefaultTransition();
$( window ).bind( "throttledresize", setDefaultTransition );
});
});
$(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();
}
});