Commit 1a781a70 authored by Mark Otto's avatar Mark Otto

Merge branch '2.0.2-wip' of github.com:twitter/bootstrap into 2.0.2-wip

Conflicts:
	docs/assets/bootstrap.zip
parents ccf76971 43760eb2
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
this.$element = $(element) this.$element = $(element)
this.options = $.extend({}, $.fn.carousel.defaults, options) this.options = $.extend({}, $.fn.carousel.defaults, options)
this.options.slide && this.slide(this.options.slide) 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 = { Carousel.prototype = {
...@@ -136,6 +139,7 @@ ...@@ -136,6 +139,7 @@
$.fn.carousel.defaults = { $.fn.carousel.defaults = {
interval: 5000 interval: 5000
, pause: 'hover'
} }
$.fn.carousel.Constructor = Carousel $.fn.carousel.Constructor = Carousel
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
title = $e.attr('data-original-title') title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.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 return title
} }
......
...@@ -1310,6 +1310,12 @@ $('#myCollapsible').on('hidden', function () { ...@@ -1310,6 +1310,12 @@ $('#myCollapsible').on('hidden', function () {
<td>5000</td> <td>5000</td>
<td>The amount of time to delay between automatically cycling an item.</td> <td>The amount of time to delay between automatically cycling an item.</td>
</tr> </tr>
<tr>
<td>pause</td>
<td>string</td>
<td>"hover"</td>
<td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td>
</tr>
</tbody> </tbody>
</table> </table>
<h3>Markup</h3> <h3>Markup</h3>
......
...@@ -1234,6 +1234,12 @@ $('#myCollapsible').on('hidden', function () { ...@@ -1234,6 +1234,12 @@ $('#myCollapsible').on('hidden', function () {
<td>5000</td> <td>5000</td>
<td>{{_i}}The amount of time to delay between automatically cycling an item.{{/i}}</td> <td>{{_i}}The amount of time to delay between automatically cycling an item.{{/i}}</td>
</tr> </tr>
<tr>
<td>{{_i}}pause{{/i}}</td>
<td>{{_i}}string{{/i}}</td>
<td>"hover"</td>
<td>{{_i}}Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.{{/i}}</td>
</tr>
</tbody> </tbody>
</table> </table>
<h3>{{_i}}Markup{{/i}}</h3> <h3>{{_i}}Markup{{/i}}</h3>
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
this.$element = $(element) this.$element = $(element)
this.options = $.extend({}, $.fn.carousel.defaults, options) this.options = $.extend({}, $.fn.carousel.defaults, options)
this.options.slide && this.slide(this.options.slide) 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 = { Carousel.prototype = {
...@@ -136,6 +139,7 @@ ...@@ -136,6 +139,7 @@
$.fn.carousel.defaults = { $.fn.carousel.defaults = {
interval: 5000 interval: 5000
, pause: 'hover'
} }
$.fn.carousel.Constructor = Carousel $.fn.carousel.Constructor = Carousel
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
title = $e.attr('data-original-title') title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.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 return title
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment