nodejs: create with sample via checkbox

This commit is contained in:
Sergey Linnik
2016-03-30 13:41:52 +03:00
parent 3624fc9b06
commit d3c450ba1b
3 changed files with 22 additions and 57 deletions

View File

@ -278,6 +278,18 @@ if (typeof jQuery != "undefined") {
});
});
jq("#createSample").click(function () {
jq(".try-editor").each(function () {
var href = jq(this).attr("href");
if (jq("#createSample").is(":checked")) {
href = href.replace("&create=true", "");
} else {
href += "&create=true";
}
jq(this).attr("href", href);
});
});
jq.dropdownToggle({
switcherSelector: ".question",
dropdownID: "hint"