yalabot / angular-foundation

http://pineconellc.github.io/angular-foundation/
Other
1.05k stars 266 forks source link

Allow specifying mouseover for dropdown #299

Open jogjayr opened 8 years ago

jogjayr commented 8 years ago

Dropdowns currently only toggle on click events. I've written a mouseover dropdown directive by copy-pasting the dropdown directive and changing the event name to mouseover (that's the gist; there's some minor complexity around event bubbling). It would be nice if this could be supported directly as an option. It would be used as:

<!-- this works on mouseover -->
<!-- default is click but dropdown can also be specified -->
<a dropdown-toggle='#dropdown1' dropdown-event='mouseover'></a>
<ul id='dropdown1'><li>....</li></ul>

If this feature is desirable in the project, I would be happy to submit a pull request with code, tests and documentation.