aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/bootstrap.js
diff options
context:
space:
mode:
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