copied over the dropdown event-handling from bootstrap v2.3.1, to fix an Android dropdown bug.