From 43202d8d810bdeaca2e77d8c9f39951445a08a9c Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 27 Jan 2016 08:50:23 -0500 Subject: [PATCH] added click function to search magnifying glass to submit the query --- js/app.js | 6 ++++++ js/custom/pageSetup.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/js/app.js b/js/app.js index e9bbdc6..fef1813 100644 --- a/js/app.js +++ b/js/app.js @@ -112,6 +112,7 @@ $(document).ready(function () { this.$search = $("#search-icon"); this.$form = $(".searchformHeader"); this.$input = $(".searchformHeader input[type='text']"); + this.$mag_glass = $("#magnifying-glass"); }, bindEvents: function () { this.$search.click( function () { @@ -119,6 +120,10 @@ $(document).ready(function () { search_module.$search.css("visibility", "hidden"); search_module.$input.focus(); }); + this.$mag_glass.click( function () { +// e.preventDefault(); + search_module.$form.submit(); + }); this.$input.blur(function () { search_module.$form.animate({width: 'toggle'}, 1000); search_module.$search.css("visibility", "visible"); @@ -194,5 +199,6 @@ var extraDay, end, arrival, currentDate, currentDate2, requiredDate, requiredDat $(".menu-icon").on("click", function () { window.scrollTo(0,0); }); + }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index c443fdd..8ca5317 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -103,6 +103,7 @@ $(document).ready(function () { this.$search = $("#search-icon"); this.$form = $(".searchformHeader"); this.$input = $(".searchformHeader input[type='text']"); + this.$mag_glass = $("#magnifying-glass"); }, bindEvents: function () { this.$search.click( function () { @@ -110,6 +111,10 @@ $(document).ready(function () { search_module.$search.css("visibility", "hidden"); search_module.$input.focus(); }); + this.$mag_glass.click( function () { +// e.preventDefault(); + search_module.$form.submit(); + }); this.$input.blur(function () { search_module.$form.animate({width: 'toggle'}, 1000); search_module.$search.css("visibility", "visible"); @@ -185,5 +190,6 @@ var extraDay, end, arrival, currentDate, currentDate2, requiredDate, requiredDat $(".menu-icon").on("click", function () { window.scrollTo(0,0); }); + }); -- 2.17.1