From 8754850ac99fd70b240d39ff16323722b244f49f Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Fri, 30 Jun 2017 01:27:21 +0530 Subject: [PATCH] Changed Navbar hover effect that only applicable for desktop devices --- datacenterlight/static/datacenterlight/js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/datacenterlight/static/datacenterlight/js/main.js b/datacenterlight/static/datacenterlight/js/main.js index d78c1d84..bfe92631 100644 --- a/datacenterlight/static/datacenterlight/js/main.js +++ b/datacenterlight/static/datacenterlight/js/main.js @@ -53,11 +53,16 @@ /* --------------------------------------------- Nav panel classic --------------------------------------------- */ - $('ul.nav li.dropdown').hover(function() { + if (window.matchMedia("(min-width: 767px)").matches) { + $('ul.nav li.dropdown').hover(function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); }, function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); }); +} else { + /* the viewport is less than 400 pixels wide */ +} + function _initScroll(){