diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index a7301575b69d7193aee03cf16947cc2deaf3207f..1e44837790a022db7472481d7f5c8d9d265ce103 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/assets/js/bootstrap-carousel.js b/docs/assets/js/bootstrap-carousel.js index e0091a7d0a644adcc96e34986d816213ca397806..4b9304201a45f36b4204ec8d643b36962402459c 100644 --- a/docs/assets/js/bootstrap-carousel.js +++ b/docs/assets/js/bootstrap-carousel.js @@ -37,7 +37,10 @@ Carousel.prototype = { cycle: function () { - this.interval = setInterval($.proxy(this.next, this), this.options.interval) + if (this.options.auto) { + this.interval = setInterval($.proxy(this.next, this), this.options.interval) + } + return this } @@ -140,6 +143,7 @@ $.fn.carousel.defaults = { interval: 5000 , pause: 'hover' + , auto: true } $.fn.carousel.Constructor = Carousel diff --git a/docs/javascript.html b/docs/javascript.html index 486fb5bfcddf651965a0dc9b9f0fa7090211b05c..a4172d17713f90c4e8b3a1b976f3d7d6fe8a57b6 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1316,6 +1316,12 @@ $('#myCollapsible').on('hidden', function () { <td>"hover"</td> <td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td> </tr> + <tr> + <td>auto</td> + <td>boolean</td> + <td>true</td> + <td>Specifies whether the carousel should cycle automatically or require user interaction.</td> + </tr> </tbody> </table> <h3>Markup</h3> diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index 7fd4c98d0211f26c2f579d8621dc15dee29db879..c8ce2a785a2dd00a17fbc77bae9693f9d9b19a0c 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -1240,6 +1240,12 @@ $('#myCollapsible').on('hidden', function () { <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> + <tr> + <td>{{_i}}auto{{/i}}</td> + <td>{{_i}}boolean{{/i}}</td> + <td>true</td> + <td>{{_i}}Specifies whether the carousel should cycle automatically or require user interaction.{{/i}}</td> + </tr> </tbody> </table> <h3>{{_i}}Markup{{/i}}</h3> diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index e0091a7d0a644adcc96e34986d816213ca397806..4b9304201a45f36b4204ec8d643b36962402459c 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -37,7 +37,10 @@ Carousel.prototype = { cycle: function () { - this.interval = setInterval($.proxy(this.next, this), this.options.interval) + if (this.options.auto) { + this.interval = setInterval($.proxy(this.next, this), this.options.interval) + } + return this } @@ -140,6 +143,7 @@ $.fn.carousel.defaults = { interval: 5000 , pause: 'hover' + , auto: true } $.fn.carousel.Constructor = Carousel