From: Anthony Talarico Date: Thu, 25 Jan 2018 18:01:37 +0000 (-0500) Subject: adding mouse over effects to keep topbar selected item active X-Git-Tag: v1.0.0^2~103 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2ab0292a936a88220bfa0b043c172c3ef9109ccc;p=WP-Themes%2Fwmta.git adding mouse over effects to keep topbar selected item active when hovering the dropdown submenus, need to keep the topbar items active while hovering over the the submenu --- diff --git a/assets/javascript/glm-dev.js b/assets/javascript/glm-dev.js index 1da16fe..8461f99 100644 --- a/assets/javascript/glm-dev.js +++ b/assets/javascript/glm-dev.js @@ -1 +1 @@ -jQuery(function(n){}); \ No newline at end of file +jQuery(function(e){var n=e("body"),t=n.find(".submenu");n.on("mouseenter",t,function(){e(this).parent().addClass("active")}),n.on("mouseleave",t,function(){e(this).parent().removeClass("active")})}); \ No newline at end of file diff --git a/glm-dev/js/glm-dev.js b/glm-dev/js/glm-dev.js index 3dda03c..72596cf 100644 --- a/glm-dev/js/glm-dev.js +++ b/glm-dev/js/glm-dev.js @@ -1,3 +1,13 @@ jQuery(function($){ - + + var body = $('body'); + var submenu = body.find('.submenu'); + + body.on("mouseenter", submenu,function(){ + $(this).parent().addClass("active"); + }) + body.on("mouseleave", submenu,function(){ + $(this).parent().removeClass("active"); + }) + }); \ No newline at end of file