diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-29 11:31:37 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-29 11:31:37 +0200 |
commit | d9fcd2d238eaf8ab61de5c8a1ef5ad6fbd5d1778 (patch) | |
tree | 074b0cd2d1de43b531b6dbdabc71f966fb032822 /js/looking-glass.js | |
parent | b4adfab383caa1a5895032291c7b264d86104980 (diff) |
Real fix for doc update when page has been reset.
Diffstat (limited to 'js/looking-glass.js')
-rw-r--r-- | js/looking-glass.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/looking-glass.js b/js/looking-glass.js index 4cbc47a..e6617ea 100644 --- a/js/looking-glass.js +++ b/js/looking-glass.js @@ -24,8 +24,16 @@ $(document).ready(function() { $('.close').click(function() { $('.alert').slideUp(); }); - $('#clear').click(function() { + + // clear the form and page + $('#clear').click(function(e) { $('.alert').slideUp(); + + e.preventDefault(); + + // reset the form and update the doc modal + $(this).closest('form').get(0).reset(); + request_doc($('#query').val()); }); // reset the view to the default one |