{"action":"created","issue":{"url":"https://api.github.com/repos/kamens/jQuery-menu-aim/issues/68","labels_url":"https://api.github.com/repos/kamens/jQuery-menu-aim/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/kamens/jQuery-menu-aim/issues/68/comments","events_url":"https://api.github.com/repos/kamens/jQuery-menu-aim/issues/68/events","html_url":"https://github.com/kamens/jQuery-menu-aim/issues/68","id":59469025,"number":68,"title":"Can get sub menu below to work....","user":{"login":"jamierussell-50","id":11269824,"avatar_url":"https://avatars.githubusercontent.com/u/11269824?v=3","gravatar_id":"","url":"https://api.github.com/users/jamierussell-50","html_url":"https://github.com/jamierussell-50","followers_url":"https://api.github.com/users/jamierussell-50/followers","following_url":"https://api.github.com/users/jamierussell-50/following{/other_user}","gists_url":"https://api.github.com/users/jamierussell-50/gists{/gist_id}","starred_url":"https://api.github.com/users/jamierussell-50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamierussell-50/subscriptions","organizations_url":"https://api.github.com/users/jamierussell-50/orgs","repos_url":"https://api.github.com/users/jamierussell-50/repos","events_url":"https://api.github.com/users/jamierussell-50/events{/privacy}","received_events_url":"https://api.github.com/users/jamierussell-50/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-03-02T11:25:25Z","updated_at":"2015-03-02T14:59:41Z","closed_at":null,"body":"Hi, I'm trying to get the drop down to work that appears below the main menu; however when I move the mouse from the main menu to the sub menu it disappears. I've put it on a test page here...\r\n\r\nhttp://uk.monsoon.co.uk/view/content/ip-test\r\n\r\nI've tried changing the top position and integrating some of the other pull requests on here but nothing has worked as if yet so any thoughts or suggestions would be appreciated! Code is below and can also be viewed on the source code of the page...Many thanks in advance\r\n\r\n<script>\r\n\r\n        var $menu = $(\".dropdown-menu\");\r\n\r\n        // jQuery-menu-aim: <meaningful part of the example>\r\n        // Hook up events to be fired on menu row activation.\r\n        $menu.menuAim({\r\n            activate: activateSubmenu,\r\n            deactivate: deactivateSubmenu,\r\n\t\t\tsubmenuDirection: \"below\"\r\n        });\r\n        // jQuery-menu-aim: </meaningful part of the example>\r\n\r\n        // jQuery-menu-aim: the following JS is used to show and hide the submenu\r\n        // contents. Again, this can be done in any number of ways. jQuery-menu-aim\r\n        // doesn't care how you do this, it just fires the activate and deactivate\r\n        // events at the right times so you know when to show and hide your submenus.\r\n        function activateSubmenu(row) {\r\n            var $row = $(row),\r\n                submenuId = $row.data(\"submenuId\"),\r\n                $submenu = $(\"#\" + submenuId),\r\n                height = $menu.outerHeight(),\r\n                width = $menu.outerWidth();\r\n            // Show the submenu\r\n\t\t\t$(\"div[rel='\"+submenuId+\"']\").css('display','block');\r\n            $submenu.css({\r\n                display: \"block\",\r\n                top: 25,\r\n                left: 0,  // main should overlay submenu\r\n                height: height - 4  // padding for main dropdown's arrow\r\n            });\r\n\r\n            // Keep the currently activated row's highlighted look\r\n            $row.find(\"a\").addClass(\"maintainHover\");\r\n        }\r\n\r\n        function deactivateSubmenu(row) {\r\n            var $row = $(row),\r\n                submenuId = $row.data(\"submenuId\"),\r\n\t\t\t\t$submenu = $(\"#\" + submenuId);\r\n            // Hide the submenu and remove the row's highlighted look\r\n\t\t\t$(\"div[rel='\"+submenuId+\"']\").css('display','none');\r\n            $submenu.css(\"display\", \"none\");\r\n            $row.find(\"a\").removeClass(\"maintainHover\");\r\n        }\r\n\r\n        // Bootstrap's dropdown menus immediately close on document click.\r\n        // Don't let this event close the menu if a submenu is being clicked.\r\n        // This event propagation control doesn't belong in the menu-aim plugin\r\n        // itself because the plugin is agnostic to bootstrap.\r\n        $(\".dropdown-menu li\").click(function(e) {\r\n            e.stopPropagation();\r\n        });\r\n\r\n        $(document).click(function() {\r\n            // Simply hide the submenu on any click. Again, this is just a hacked\r\n            // together menu/submenu structure to show the use of jQuery-menu-aim.\r\n            $(\".mega-arrow\").css(\"display\", \"none\");\r\n\t\t\t$(\".popover\").css(\"display\", \"none\");\r\n            $(\"a.maintainHover\").removeClass(\"maintainHover\");\r\n        });\r\n\r\n    </script>\r\n"},"comment":{"url":"https://api.github.com/repos/kamens/jQuery-menu-aim/issues/comments/76726034","html_url":"https://github.com/kamens/jQuery-menu-aim/issues/68#issuecomment-76726034","issue_url":"https://api.github.com/repos/kamens/jQuery-menu-aim/issues/68","id":76726034,"user":{"login":"jamierussell-50","id":11269824,"avatar_url":"https://avatars.githubusercontent.com/u/11269824?v=3","gravatar_id":"","url":"https://api.github.com/users/jamierussell-50","html_url":"https://github.com/jamierussell-50","followers_url":"https://api.github.com/users/jamierussell-50/followers","following_url":"https://api.github.com/users/jamierussell-50/following{/other_user}","gists_url":"https://api.github.com/users/jamierussell-50/gists{/gist_id}","starred_url":"https://api.github.com/users/jamierussell-50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamierussell-50/subscriptions","organizations_url":"https://api.github.com/users/jamierussell-50/orgs","repos_url":"https://api.github.com/users/jamierussell-50/repos","events_url":"https://api.github.com/users/jamierussell-50/events{/privacy}","received_events_url":"https://api.github.com/users/jamierussell-50/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T14:59:41Z","updated_at":"2015-03-02T14:59:41Z","body":"Hmm ok that's going to be a pain as I'm struggling to get the submenu to be 100% width with the top nav remaining centered with several items, part of the reason I was looking at using this over our current one (See example below so you can see what I mean):\r\nhttp://uk.monsoon.co.uk/view/content/ip-test\r\n\r\nI'll have a play around with it but if you have any other suggestions they'd be most welcome. Kind regards,\r\nJamie"}}