mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-02-15 22:44:55 -05:00
demos: load docs after demos, otherwise insert of docs sometimes fails
This commit is contained in:
@@ -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;
|
||||
});
|
||||
$("a:last", header).click(function() {
|
||||
details.hide().parent().removeClass("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();
|
||||
});
|
||||
$(".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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user