mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Allow local browsing of the docs without a web server
This commit is contained in:
parent
2b40784c4e
commit
3f522a2bce
1 changed files with 13 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue