Close dropdown on touch devices
RhysyG opened this issue · 2 comments
Hi there,
Great plugin!
Just a little question, what would be involved if I wanted to add the functionality of closing the dropdown (once opened) by clicking anywhere outside the dropdown? It works with a mouse click, just not a "touch" click.
Thanks.
You could do that with the touchstart or touchend event. Watch for it on the document and make sure the target element isn't the dropdown.
On Jul 8, 2014, at 2:22 AM, RhysyG notifications@github.com wrote:
Hi there,
Great plugin!
Just a little question, what would be involved if I wanted to add the functionality of closing the dropdown (once opened) by clicking anywhere outside the elements? It works with a mouse click, just not a "touch" click.
Thanks.
—
Reply to this email directly or view it on GitHub.
Awesome, worked perfectly!
Thanks mate.