diff options
Diffstat (limited to 'app/notes/static/count.js')
-rw-r--r-- | app/notes/static/count.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/notes/static/count.js b/app/notes/static/count.js new file mode 100644 index 0000000..d75d870 --- /dev/null +++ b/app/notes/static/count.js @@ -0,0 +1,17 @@ +var jQuery = django.jQuery; +var $ = jQuery; +$(document).ready(function () { + $('#id_body_markdown').after('<span style="display: inline-block; margin-left: 2em;"><span id="counter">400</span> chars used </span>'); + +$('#id_body_markdown').simplyCountable({ + counter: '#counter', + countType: 'characters', + maxCount: 400, + strictMax: false, + countDirection: 'up', + safeClass: 'safe', +}); + + +}); + |