vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js in twitter-bootstrap-rails-2.1.7 vs vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js in twitter-bootstrap-rails-2.1.8
- old
+ new
@@ -1,7 +1,7 @@
/* ==========================================================
- * bootstrap-carousel.js v2.2.1
+ * bootstrap-carousel.js v2.2.2
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,11 +27,10 @@
* ========================= */
var Carousel = function (element, options) {
this.$element = $(element)
this.options = 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))
}
@@ -139,10 +138,12 @@
/* CAROUSEL PLUGIN DEFINITION
* ========================== */
+ var old = $.fn.carousel
+
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
@@ -159,9 +160,17 @@
, pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
+
+ /* CAROUSEL NO CONFLICT
+ * ==================== */
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
/* CAROUSEL DATA-API
* ================= */
$(document).on('click.carousel.data-api', '[data-slide]', function (e) {
\ No newline at end of file