Skip to content
Permalink
Browse files

demos: load docs after demos, otherwise insert of docs sometimes fails

  • Loading branch information
jzaefferer committed Jan 26, 2009
1 parent f17f994 commit 6b37cd7bc6f0e3a10becc1bedb31d92f29e21830
Showing with 21 additions and 20 deletions.
  1. +21 −20 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 @@
$('<div id="demo-notes"></div>').insertAfter('#demo-config');
}
$('#demo-notes').hide().empty().html(notes.html());
$('#demo-notes').fadeIn();
$('#demo-notes').show();
notes.hide();
}

0 comments on commit 6b37cd7

Please sign in to comment.
You can’t perform that action at this time.