From c13c5a717ad2ede8f51cc90c66daf8f573bf2ea4 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Fri, 16 Sep 2011 09:26:34 +0100 Subject: Preserve search text when flipping between result types. Fixes #187. --- public/javascripts/general.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'public/javascripts/general.js') diff --git a/public/javascripts/general.js b/public/javascripts/general.js index 3d6aae0d8..ab74cf318 100644 --- a/public/javascripts/general.js +++ b/public/javascripts/general.js @@ -36,4 +36,12 @@ $(document).ready(function() { }); $('.close-button').click(function() { $(this).parent().hide() }); + $('div#variety-filter a').each(function() { + $(this).click(function() { + var form = $('form#search_form'); + form.attr('action', $(this).attr('href')); + form.submit(); + return false; + }) + }) }) \ No newline at end of file -- cgit v1.2.3