Permalink
Browse files

docs; persist api checked condition

  • Loading branch information...
1 parent c46036b commit 05fea1d3884ce62bab50368c0b6fbb162e7cc0c0 @aheckmann aheckmann committed Oct 10, 2012
Showing with 15 additions and 1 deletion.
  1. +11 −1 docs/api.jade
  2. +4 −0 docs/js/cookies.min.js
View
@@ -499,10 +499,20 @@ html(lang='en')
document.body.className = 'load';
include includes/googleanalytics
script(src="/docs/js/zepto.min.js")
+ script(src="/docs/js/cookies.min.js")
script.
$(".module").on("click", ".showcode", function (e) {
$(this).closest(".item").find(".sourcecode").first().toggle();
});
$("#content .controls input").on("click", function (e) {
$(".private").toggle()
- })
+ var checked = $(this).prop('checked');
+ Cookies.set('prv', checked);
+ });
+ ;(function(){
+ var checked = 'true' === Cookies.get('prv');
+ if (checked) {
+ $("#content .controls input").prop('checked', 'checked');
+ $(".private").show()
+ }
+ })()
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 05fea1d

Please sign in to comment.