diff --git a/demos/index.html b/demos/index.html index 479ae140c..51c4a9fcd 100644 --- a/demos/index.html +++ b/demos/index.html @@ -72,8 +72,6 @@ jQuery(function($) { $('.left-nav a').click(function(ev) { - // reset dialog - $(".ui-dialog-content").remove(); window.location.hash = this.href.replace(/.+\/([^\/]+)\/index\.html/,'$1') + '|default'; loadPage(this.href); ev.preventDefault(); @@ -83,14 +81,15 @@ if (window.location.hash.indexOf('|') === -1) { window.location.hash += '|default'; } - var path = window.location.href.replace('#',''); - path = path.replace('\|','/') + '.html'; + var path = window.location.href.replace(/(index\.html)?#/,''); + path = path.replace('\|','/') + '.html'; loadPage(path); } - function loadPage(path) { + function loadPage(path) { var section = path.replace(/\/[^\/]+\.html/,''); var header = section.replace(/.+\/([^\/]+)/,'$1'); + $('td.normal div.normal') .empty() .append('