diff options
Diffstat (limited to 'demos/index.html')
-rw-r--r-- | demos/index.html | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/demos/index.html b/demos/index.html index 69767febf..76ddcd3da 100644 --- a/demos/index.html +++ b/demos/index.html @@ -20,8 +20,6 @@ <script src="../ui/jquery.ui.draggable.js"></script> <script src="../ui/jquery.ui.droppable.js"></script> <script src="../ui/jquery.ui.menu.js"></script> - <script src="../ui/jquery.ui.menubar.js"></script> - <script src="../ui/jquery.ui.popup.js"></script> <script src="../ui/jquery.ui.position.js"></script> <script src="../ui/jquery.ui.progressbar.js"></script> <script src="../ui/jquery.ui.resizable.js"></script> @@ -111,7 +109,7 @@ <script src="../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script> <script> $(function() { - + $('.left-nav a').click(function(ev) { window.location.hash = this.href.replace(/.+\/([^\/]+)\/index\.html/,'$1') + '|default'; loadPage(this.href); @@ -119,20 +117,20 @@ $(this).addClass('selected'); ev.preventDefault(); }); - + if (window.location.hash) { if (window.location.hash.indexOf('|') === -1) { - window.location.hash += '|default'; - } + window.location.hash += '|default'; + } 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').replace(/_/, ' '); - + $('td.normal div.normal') .empty() .append('<h4 class="demo-subheader">Functional demo:</h4>') @@ -148,7 +146,7 @@ $(this).click(function() { resetDemos(); - + $(this).parents('ul').find('li').removeClass('demo-config-on'); $(this).parent().addClass('demo-config-on'); $('#demo-notes').fadeOut(); @@ -167,8 +165,8 @@ $('#demo-config-menu a').each(function(){ if (this.href.indexOf(demo + '.html') !== -1) { $(this).parents('ul').find('li').removeClass('demo-config-on'); - $(this).parent().addClass('demo-config-on'); - loadDemo(this.href); + $(this).parent().addClass('demo-config-on'); + loadDemo(this.href); } }); } @@ -184,10 +182,10 @@ .end() .end() ; - + resetDemos(); } - + function loadDemo(path) { var directory = path.match(/([^\/]+)\/[^\/\.]+\.html$/)[1]; $.get(path, function(data) { @@ -207,7 +205,7 @@ $('#demo-link a').attr('href', path); updateDemoNotes(); updateDemoSource(source); - + if (/default.html$/.test(path)) { $.get("documentation/docs-" + path.match(/demos\/(.+)\//)[1] + ".html", function(html) { $("#demo-source").after(html); @@ -241,7 +239,7 @@ $('#demo-notes').show(); notes.hide(); } - + function updateDemoSource(source) { if ($('#demo-source').length == 0) { $('<div id="demo-source"><a href="#" class="source-closed">View Source</a><div><pre><code></code></pre></div></div>').insertAfter('#demo-notes'); @@ -257,12 +255,12 @@ $('#demo-source code').empty().text(cleanedSource); } - + function resetDemos() { $.datepicker.setDefaults($.extend({showMonthAfterYear: false}, $.datepicker.regional[''])); - $(".ui-dialog-content").remove(); + $(".ui-dialog-content").remove(); } - + }); </script> </head> @@ -285,8 +283,6 @@ <dd><a href="datepicker/index.html">Datepicker</a></dd> <dd><a href="dialog/index.html">Dialog</a></dd> <dd><a href="menu/index.html">Menu</a></dd> - <dd><a href="menubar/index.html">Menubar</a></dd> - <dd><a href="popup/index.html">Popup</a></dd> <dd><a href="progressbar/index.html">Progressbar</a></dd> <dd><a href="slider/index.html">Slider</a></dd> <dd><a href="spinner/index.html">Spinner</a></dd> @@ -307,7 +303,7 @@ <dd><a href="widget/index.html">Widget</a></dd> <dt>About jQuery UI</dt> <dd><a href="http://jqueryui.com/docs/Getting_Started">Getting Started</a></dd> - <dd><a href="http://jqueryui.com/docs/Upgrade_Guide">Upgrade Guide</a></dd> + <dd><a href="http://jqueryui.com/docs/Upgrade_Guide">Upgrade Guide</a></dd> <dd><a href="http://jqueryui.com/docs/Changelog">Changelog</a></dd> <dd><a href="http://jqueryui.com/docs/Roadmap">Roadmap</a></dd> <dd><a href="http://jqueryui.com/docs/Subversion">Subversion Access</a></dd> @@ -328,7 +324,7 @@ <p> These demos showcase some common uses of each jQuery UI plugin. Simply copy and paste code from the demos to get started. Have fun playing with them. </p> - + </div> </td> |