soundasleep / jquery-dropdown

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

Show dropdown programmatically? #31

Closed irfaan closed 11 years ago

irfaan commented 11 years ago

Hello - thanks for your contribution to the open source community! I've been playing around with your code and enjoying it. Thanks again.

I have been struggling to extend your code to include a function to launch/show the dropdown programmatically. Is there an easy way to achieve this? Without any modifications, I see that your code allows us to 'attach' the dropdown html to an element, so that when the element is clicked, the dropdown is shown.

How do you suggest I go about making this modification?

Thanks for your help! irfaan

claviska commented 11 years ago

The best way would be to add a show method that calls the internal show function. You'd have to call it from the context of the trigger (and probably check for the dropdown-disabled attribute), but it shouldn't me too difficult.

gabrielnahmias commented 11 years ago

I believe https://github.com/claviska/jquery-dropdown/pull/38 has addressed this.

omeraplak commented 11 years ago

done, https://github.com/claviska/jquery-dropdown/pull/41