From dbc2cd425f24a3f858452552c54d1d32b1e3d25c Mon Sep 17 00:00:00 2001 From: Yash Agarwal <32675391+yashacon@users.noreply.github.com> Date: Thu, 5 Nov 2020 17:22:38 +0530 Subject: [PATCH] Update script.js Correcting auto hide functionality of collapsible menu --- Assignments/module-5/js/script.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Assignments/module-5/js/script.js b/Assignments/module-5/js/script.js index ed455ddd..164d1a63 100644 --- a/Assignments/module-5/js/script.js +++ b/Assignments/module-5/js/script.js @@ -1,7 +1,5 @@ -$(function () { // Same as document.addEventListener("DOMContentLoaded"... - - // Same as document.querySelector("#navbarToggle").addEventListener("blur",... - $("#navbarToggle").blur(function (event) { +$(document).ready(function() { + $(document).on("click",function(e){ var screenWidth = window.innerWidth; if (screenWidth < 768) { $("#collapsable-nav").collapse('hide');