From d9fcd2d238eaf8ab61de5c8a1ef5ad6fbd5d1778 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Fri, 29 Aug 2014 11:31:37 +0200 Subject: Real fix for doc update when page has been reset. --- js/looking-glass.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'js') 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 -- cgit v1.2.3