From c1ce89359a7b54ec97b54ce577e5534c180c5c4b Mon Sep 17 00:00:00 2001 From: HumairAK Date: Mon, 18 Jul 2016 06:49:16 -0400 Subject: Various fixes, see changelog for details. --- assets/js/script.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'assets/js/script.js') diff --git a/assets/js/script.js b/assets/js/script.js index d53a4ee..e752f0c 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -49,5 +49,31 @@ function main(){ } }); + + + // --- nav scripts --- + $("input").keyup( function(event) { + if(event.keyCode == 13){ + $(".go-button").click(); + } + }); + + $(".dropdown").hover(function(){ + $(".dropdown-toggle", this).trigger("click"); + }); + + $(".dropdown-toggle").click(function() { + $(this).next(".dropdown-menu").fadeToggle(200); + }); + + // For the Second level Dropdown menu, highlight the parent + $( ".dropdown-menu" ) + .mouseenter(function() { + $(this).parent('li').addClass('active'); + }) + .mouseleave(function() { + $(this).parent('li').removeClass('active'); + }); + } $(document).ready(main); \ No newline at end of file -- cgit v1.2.3