From 6b37cd7bc6f0e3a10becc1bedb31d92f29e21830 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Mon, 26 Jan 2009 23:45:40 +0000 Subject: [PATCH] demos: load docs after demos, otherwise insert of docs sometimes fails --- demos/index.html | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/demos/index.html b/demos/index.html index c9058f930..6e2b623d5 100644 --- a/demos/index.html +++ b/demos/index.html @@ -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 @@ $('
').insertAfter('#demo-config'); } $('#demo-notes').hide().empty().html(notes.html()); - $('#demo-notes').fadeIn(); + $('#demo-notes').show(); notes.hide(); } -- 2.39.5