Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to disable dropdown? #13836

Closed
cdutson opened this issue Jun 16, 2014 · 2 comments
Closed

No way to disable dropdown? #13836

cdutson opened this issue Jun 16, 2014 · 2 comments

Comments

@cdutson
Copy link

cdutson commented Jun 16, 2014

Maybe I'm missing something, but once dropdown has been enabled, there doesn't seem to be any way of destroying it.

Use case:

I'm retrofitting a website to be somewhat responsive. One of the requirements therein requires me to convert the navigation into something a bit more mobile-friendly. I've opted to create a collapsable menu, which I've got going, except that dropdown.js has been applied to the the navigation previously.

Since toggle is returning false (which I question whether that should be a e.preventDefault(), but that's a different discussion), There's no way for me to attach my own click event to the button. I could hook into the announced events from the plugin, but it would be a lot easier for me to simply disable the plugin when the mobile view is hit (I'm using enquire.js for this).

something like: $('#samplenav').dropdown('destroy') would be rather useful, especially since you can enable it at any time by simply applying $.dropdown() to an element.

@cvrebert
Copy link
Collaborator

Refs #13655.

@cvrebert
Copy link
Collaborator

Consolidating into #13655.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants