r1801 - trunk/demos

r1801 - trunk/demos


Author: joern.zaefferer
Date: Mon Jan 26 15:45:40 2009
New Revision: 1801
Modified:
trunk/demos/index.html
Log:
demos: load docs after demos, otherwise insert of docs sometimes fails
Modified: trunk/demos/index.html
==============================================================================
--- trunk/demos/index.html    (original)
+++ trunk/demos/index.html    Mon Jan 26 15:45:40 2009
@@ -168,28 +168,29 @@
                $('#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);
-                    $("#widget-docs").tabs();
-                    $(".param-header").click(function() {
-                        $(this).parent().toggleClass("param-open").end().next().toggle();
-                    });
-                    $(".docs-list-header").each(function() {
-                        var header = $(this);
-                        var details = header.next().find(".param-details").hide();
-                        $("a:first", header).click(function() {
-                            details.show().parent().addClass("param-open");
-                            return false;
+                
+                if (/default.html$/.test(path)) {
+                    $.get("documentation/docs-" + path.match(/demos\/(.+)\//)[1]
+ ".html", function(html) {
+                        $("#demo-source").after(html);
+                        $("#widget-docs").tabs();
+                        $(".param-header").click(function() {
+                            $(this).parent().toggleClass("param-open").end().next().toggle();
                        });
-                        $("a:last", header).click(function() {
-                            details.hide().parent().removeClass("param-open");
-                            return false;
+                        $(".docs-list-header").each(function() {
+                            var header = $(this);
+                            var details = header.next().find(".param-details").hide();
+                            $("a:first", header).click(function() {
+                                details.show().parent().addClass("param-open");
+                                return false;
+                            });
+                            $("a:last", header).click(function() {
+                                details.hide().parent().removeClass("param-open");
+                                return false;
+                            });
                        });
                    });
-                });
-            }
+                }
+            });
        }
        function updateDemoNotes() {
@@ -198,7 +199,7 @@
                $('<div id="demo-notes"></div>').insertAfter('#demo-config');
            }
            $('#demo-notes').hide().empty().html(notes.html());
-            $('#demo-notes').fadeIn();
+            $('#demo-notes').show();
            notes.hide();
        }