+
+ /* now hide the “advanced” section. */
+ advancedSection = $("#sone #create-sone .advanced");
+ advancedSection.hide();
+
+ /* show a checkbox instead. */
+ checkboxSection = $("<div></div>");
+ checkbox = $("<input type=\"checkbox\" />").click(function() {
+ if (this.checked) {
+ advancedSection.show();
+ $("#sone #create-sone button[name=create-random]").hide();
+ } else {
+ advancedSection.hide();
+ $("#sone #create-sone button[name=create-random]").show();
+ }
+ })
+ checkboxSection.append(checkbox).append("Show advanced settings");
+ advancedSection.before(checkboxSection);