diff options
author | Prabhu Ramachandran | 2016-12-03 15:10:56 +0530 |
---|---|---|
committer | GitHub | 2016-12-03 15:10:56 +0530 |
commit | f416da9901ebca437c100bb80511eb87544f709d (patch) | |
tree | d63c7ce7e5f6d1c97d401d317a5211837fb011aa /yaksh/static | |
parent | 7fab5de07a05cf8f84e7beb8b4c166c0398172be (diff) | |
parent | f76c6c7aab4df2f743259334aa91ca295cb854ee (diff) | |
download | online_test-f416da9901ebca437c100bb80511eb87544f709d.tar.gz online_test-f416da9901ebca437c100bb80511eb87544f709d.tar.bz2 online_test-f416da9901ebca437c100bb80511eb87544f709d.zip |
Merge pull request #161 from adityacp/quiz_instructions_editable
Quiz instructions editable
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/add_quiz.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/yaksh/static/yaksh/js/add_quiz.js b/yaksh/static/yaksh/js/add_quiz.js index 3da4d5c..f4067ed 100644 --- a/yaksh/static/yaksh/js/add_quiz.js +++ b/yaksh/static/yaksh/js/add_quiz.js @@ -7,6 +7,12 @@ function test() { document.getElementById("submit").innerHTML = "Save"; } + var template = "<p id='rendered_text' align='justify'></p>"; + $(template).insertBefore("#id_instructions"); + $('#id_instructions').keypress(function (event){ + document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ; + }); + document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ; } String.prototype.beginsWith = function (string) { |