aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/bootstrap.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-09-25 22:00:41 -0700
committerMark Otto <[email protected]>2012-09-25 22:00:41 -0700
commitce19e63d5b068ba0698dee4e2d99c725f6799b0d (patch)
treebda8377cdc83204780bdf624833725a127ded586 /docs/assets/js/bootstrap.js
parent527d01ce99a0cae8eae7868c0649dca60cda338c (diff)
parentf4d3d7da2e3ddbd751e053729935df1f3dd4c051 (diff)
downloadbootstrap-ce19e63d5b068ba0698dee4e2d99c725f6799b0d.tar.xz
bootstrap-ce19e63d5b068ba0698dee4e2d99c725f6799b0d.zip
Merge branch '2.1.2-wip' into box-sizing-exercise
Conflicts: docs/assets/css/bootstrap-responsive.css docs/assets/css/bootstrap.css docs/base-css.html docs/templates/pages/base-css.mustache less/forms.less less/mixins.less
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