aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/bootstrap.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-09-22 21:37:08 -0700
committerMark Otto <[email protected]>2012-09-22 21:37:08 -0700
commitc3ea955661568b9b05075e62c0b5d2e8bf7ef10c (patch)
tree73e069a0fbd69e7b5764da3f18008d185859c520 /docs/assets/js/bootstrap.js
parenta419e70a42f7f4c8165e640774082d3fec61b4c4 (diff)
parentebf94c53a5497ff6d2aa353027d3a2ac3b67b18a (diff)
downloadbootstrap-c3ea955661568b9b05075e62c0b5d2e8bf7ef10c.tar.xz
bootstrap-c3ea955661568b9b05075e62c0b5d2e8bf7ef10c.zip
Merge branch '2.1.2-wip' of github.com:twitter/bootstrap into 2.1.2-wip
Diffstat (limited to 'docs/assets/js/bootstrap.js')
-rw-r--r--docs/assets/js/bootstrap.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js
index 4baf3759c..5a5022be1 100644
--- a/docs/assets/js/bootstrap.js
+++ b/docs/assets/js/bootstrap.js
@@ -20,13 +20,13 @@
!function ($) {
- $(function () {
+ "use strict"; // jshint ;_;
- "use strict"; // jshint ;_;
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+ * ======================================================= */
- /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
- * ======================================================= */
+ $(function () {
$.support.transition = (function () {
@@ -1797,7 +1797,7 @@
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
- if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
+ if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this))
}
@@ -1806,6 +1806,15 @@
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
}
+ , eventSupported: function(eventName) {
+ var isSupported = eventName in this.$element
+ if (!isSupported) {
+ this.$element.setAttribute(eventName, 'return;')
+ isSupported = typeof this.$element[eventName] === 'function'
+ }
+ return isSupported
+ }
+
, move: function (e) {
if (!this.shown) return