aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-02-26 23:16:11 -0800
committerMark Otto <[email protected]>2012-02-26 23:16:11 -0800
commit1a781a707e0785a1abd079a9c29628b0d8d1867d (patch)
treea38c6b8485d24e8df50ede805084ba083e2df9a0 /js
parentccf7697185488850e7450bfb05092bebc2004084 (diff)
parent43760eb2029c73b6be6b0dbeb753be1e247697d9 (diff)
downloadbootstrap-1a781a707e0785a1abd079a9c29628b0d8d1867d.tar.xz
bootstrap-1a781a707e0785a1abd079a9c29628b0d8d1867d.zip
Merge branch '2.0.2-wip' of github.com:twitter/bootstrap into 2.0.2-wip
Conflicts: docs/assets/bootstrap.zip
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-carousel.js4
-rw-r--r--js/bootstrap-tooltip.js2
2 files changed, 5 insertions, 1 deletions
diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js
index aef98fb05..e0091a7d0 100644
--- a/js/bootstrap-carousel.js
+++ b/js/bootstrap-carousel.js
@@ -29,6 +29,9 @@
this.$element = $(element)
this.options = $.extend({}, $.fn.carousel.defaults, options)
this.options.slide && this.slide(this.options.slide)
+ this.options.pause == 'hover' && this.$element
+ .on('mouseenter', $.proxy(this.pause, this))
+ .on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype = {
@@ -136,6 +139,7 @@
$.fn.carousel.defaults = {
interval: 5000
+ , pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js
index d76e51e8c..e7bfd09bf 100644
--- a/js/bootstrap-tooltip.js
+++ b/js/bootstrap-tooltip.js
@@ -206,7 +206,7 @@
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
- title = title.toString().replace(/(^\s*|\s*$)/, "")
+ title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
return title
}