diff options
| author | Jacob Thornton <[email protected]> | 2012-03-19 15:48:57 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-03-19 15:48:57 -0700 |
| commit | 67f199678c6f764f2812260f42b553b22ec740f8 (patch) | |
| tree | 50d0b85cede5029579fa2ed86d89546367c6b80c /docs/assets | |
| parent | 83a7a698939b5b4cba3c04a86befc12b9005df3d (diff) | |
| download | bootstrap-67f199678c6f764f2812260f42b553b22ec740f8.tar.xz bootstrap-67f199678c6f764f2812260f42b553b22ec740f8.zip | |
if interval is false, do not autocycle the carousel
Diffstat (limited to 'docs/assets')
| -rw-r--r-- | docs/assets/bootstrap.zip | bin | 55701 -> 55811 bytes | |||
| -rw-r--r-- | docs/assets/js/bootstrap-carousel.js | 9 | ||||
| -rw-r--r-- | docs/assets/js/bootstrap-typeahead.js | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip Binary files differindex ff029ffdd..1a07056b6 100644 --- a/docs/assets/bootstrap.zip +++ b/docs/assets/bootstrap.zip diff --git a/docs/assets/js/bootstrap-carousel.js b/docs/assets/js/bootstrap-carousel.js index 8c0723d28..287519900 100644 --- a/docs/assets/js/bootstrap-carousel.js +++ b/docs/assets/js/bootstrap-carousel.js @@ -27,7 +27,7 @@ var Carousel = function (element, options) { this.$element = $(element) - this.options = $.extend({}, $.fn.carousel.defaults, options) + this.options = options this.options.slide && this.slide(this.options.slide) this.options.pause == 'hover' && this.$element .on('mouseenter', $.proxy(this.pause, this)) @@ -37,7 +37,8 @@ Carousel.prototype = { cycle: function () { - this.interval = setInterval($.proxy(this.next, this), this.options.interval) + this.options.interval + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) return this } @@ -129,11 +130,11 @@ return this.each(function () { var $this = $(this) , data = $this.data('carousel') - , options = typeof option == 'object' && option + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) if (!data) $this.data('carousel', (data = new Carousel(this, options))) if (typeof option == 'number') data.to(option) else if (typeof option == 'string' || (option = options.slide)) data[option]() - else data.cycle() + else if (options.interval) data.cycle() }) } diff --git a/docs/assets/js/bootstrap-typeahead.js b/docs/assets/js/bootstrap-typeahead.js index dc2f88221..804e60dc4 100644 --- a/docs/assets/js/bootstrap-typeahead.js +++ b/docs/assets/js/bootstrap-typeahead.js @@ -109,7 +109,8 @@ } , highlighter: function (item) { - return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) { + var query = this.query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') + return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) { return '<strong>' + match + '</strong>' }) } |
