]> source.dussan.org Git - jquery-ui.git/commitdiff
demos/index.html - fixed syntax error and right navigation picking up full url in...
authorCa-Phun Ung <pazu2k@gmail.com>
Tue, 30 Dec 2008 11:19:49 +0000 (11:19 +0000)
committerCa-Phun Ung <pazu2k@gmail.com>
Tue, 30 Dec 2008 11:19:49 +0000 (11:19 +0000)
demos/index.html

index 526ab53d7650945ebbd16c50f7bef54e24f69760..1a4505af7de54ad6072f325d6ee8a116d36f7cd3 100644 (file)
@@ -18,8 +18,8 @@
        <script type="text/javascript" src="../ui/ui.sortable.js"></script>
        <script type="text/javascript" src="../ui/ui.tabs.js"></script>
        <script type="text/javascript">
-       jQuery(function($){
-               $('.left-nav a').click(function(ev){
+       jQuery(function($) {
+               $('.left-nav a').click(function(ev) {
                        var section = this.href.replace('/index.html','');
                        var header = section.replace(/.+\/([^\/]+)/,'$1');
                        $('td.normal div.normal')
@@ -32,7 +32,7 @@
                                        .find('#demo-config-menu')
                                                .load(this.href + ' .demos-nav', function() {
                                                        $('#demo-config-menu a').each(function() {
-                                                               this.setAttribute('href', section + '/' + this.getAttribute('href'));
+                                                               this.setAttribute('href', section + '/' + this.getAttribute('href').replace(/.+\/([^\/]+)/,'$1'));
                                                                $(this).attr('target', 'demo-frame');
                                                                $(this).click(function() {
                                                                        $(this).parents('ul').find('li').removeClass('demo-config-on');