twitter/bootstrap — pull request #3044 by matheusvilela (2012-04-12 20:28:56+00:00)
Title: Fix tooltips show/hide delay

This commit fixes two bugs on the tooltip plugin.

On http://jsfiddle.net/ZTYT8/, if the mouse pointer stays on the tooltip elements for less than a second and leave it, the tooltip show function is triggered after one sec, even if the mouse pointer isn't on the element anymore.

Meanwhile, on http://jsfiddle.net/R4wQT/, if the mouse pointer pass over the tooltip elements, leave it, and then come back before 1 sec, the timer used to show the tooltip is not started again.

This patch fixes both issues, using setTimeout and clearTimeout in order to address the problems.