CWSpear/twitter-bootstrap-hover-dropdown — pull request #22 by jrchamp (2013-06-21 19:07:30+00:00)
Title: Change shouldHover to Only Enable Hover for Mouse Users

If it looks like the user is using the mouse, allow mouseenter events to trigger the dropdown on hover. This avoids the situation where using a touch screen on a mobile device will trigger both the hover and click events (causing the page to change, instead of expanding the dropdown). Also, it stops calling a function each time to determine if it shouldHover, which feels cleaner.

20 mousemove events and 4 summed pixels are somewhat arbitrary, so if this code is interesting, you may want to tweak these numbers.