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 | |
| parent | 83a7a698939b5b4cba3c04a86befc12b9005df3d (diff) | |
| download | bootstrap-67f199678c6f764f2812260f42b553b22ec740f8.tar.xz bootstrap-67f199678c6f764f2812260f42b553b22ec740f8.zip | |
if interval is false, do not autocycle the carousel
Diffstat (limited to 'docs')
| -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 | ||||
| -rw-r--r-- | docs/javascript.html | 2 | ||||
| -rw-r--r-- | docs/templates/pages/javascript.mustache | 2 |
5 files changed, 9 insertions, 7 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>' }) } diff --git a/docs/javascript.html b/docs/javascript.html index a90562767..54177b566 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1308,7 +1308,7 @@ $('#myCollapsible').on('hidden', function () { <td>interval</td> <td>number</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. If false, carousel will not automatically cycle.</td> </tr> <tr> <td>pause</td> diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index 7fd4c98d0..007974183 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -1232,7 +1232,7 @@ $('#myCollapsible').on('hidden', function () { <td>{{_i}}interval{{/i}}</td> <td>{{_i}}number{{/i}}</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. If false, carousel will not automatically cycle.{{/i}}</td> </tr> <tr> <td>{{_i}}pause{{/i}}</td> |
