jQuery-menu-aim icon indicating copy to clipboard operation
jQuery-menu-aim copied to clipboard

Making the plugin stateful for ability to destroy/reset

Open bobbyrenwick opened this issue 11 years ago • 3 comments

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.

bobbyrenwick avatar Oct 25 '13 14:10 bobbyrenwick

+1

But this doesnt fix #14 with out returning true to the exitMenu option.

arun057 avatar Nov 05 '13 16:11 arun057

:+1: for ability to cleanup

philfreo avatar Aug 28 '14 22:08 philfreo

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");

slambdin1 avatar Jan 25 '16 22:01 slambdin1