diff options
Diffstat (limited to 'assets/js')
| -rw-r--r-- | assets/js/home_page.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/assets/js/home_page.js b/assets/js/home_page.js index 4c9151a..1bc5ccf 100644 --- a/assets/js/home_page.js +++ b/assets/js/home_page.js @@ -1,4 +1,14 @@ function main(){ + $("#go-button").on('click', function(e) { + e.preventDefault(); + if ($("#drop-down-value").text() == "Courses") { + // $("#search-field").attr("action", "search/courses"); + window.location += 'search/courses?search=' + $("#user-input-course").val(); + } else { + // $("#search-field").attr("action", "search/users"); + window.location += 'search/users?search=' + $("#user-input-users").val(); + } + }); // Search bar drop down scripting (some of it is shared with nav panel // in script.js but this code in this file is exclusive to search bar |
