adding mouse over effects to keep topbar selected item active
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 Jan 2018 18:01:37 +0000 (13:01 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 Jan 2018 18:01:37 +0000 (13:01 -0500)
when hovering the dropdown submenus, need to keep the topbar items active
while hovering over the the submenu

assets/javascript/glm-dev.js
glm-dev/js/glm-dev.js

index 1da16fe..8461f99 100644 (file)
@@ -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
index 3dda03c..72596cf 100644 (file)
@@ -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