jQuery-menu-aim
jQuery-menu-aim copied to clipboard
Making the plugin stateful for ability to destroy/reset
We're using jQuery-menu-aim in a single page app and so needed the ability to destroy the event listeners that it sets up and also to reset the menu-aim to its initial state.
This is 100% backwards compatible and should allow for greater extensibility.
+1
But this doesnt fix #14 with out returning true to the exitMenu option.
:+1: for ability to cleanup
I'm not able to destroy the menu when i use the .menuAim('destroy') function. I pasted a snippet of my code below. Any ideas?
var navBar = $('.ko-nav'); navBar.menuAim({ activate: activateSubmenu, deactivate: deactivateSubmenu, rowSelector: listOfRows, exitMenu: function() { return true; }, submenuDirection: "below" }); ..... .....
$('.ko-nav').menuAim("destroy");