soundasleep / jquery-dropdown

Bootstrap-style dropdowns with some added features and no dependencies.
Other
767 stars 268 forks source link

Support for Chosen or any other custom element #77

Open Alexwijn opened 9 years ago

Alexwijn commented 9 years ago

I'm using Chosen inside your dropdown element and because of that I need to adjust the script to avoid that the dropdown box is closing when I click it. This is because chosen is an "A" element.

I add the following: if (targetGroup.is('.chosen-container')) { return; }

In the following if-statement: if (targetGroup && targetGroup.is('.dropdown'))

Any change you could add support things like this? For example have a config variable where you can specify specific elements that will not close it.

Thanks.

claviska commented 9 years ago

Makes sense. I'm open to a PR because I probably won't get to it right away :)

rythos42 commented 7 years ago

I just updated my copy for my purposes, but I wanted the opposite -- to close the drop down when clicking an INPUT (button) element.