1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-28 22:39:11 +02:00

fix tests

This commit is contained in:
fat
2013-05-16 17:44:50 -07:00
parent 19de2e8603
commit a72d0d6e3a
23 changed files with 1534 additions and 1616 deletions

View File

@@ -111,7 +111,7 @@
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
var e = $.Event('slide', { relatedTarget: $next[0], direction: direction })
var e = $.Event('bs:carousel:slide', { relatedTarget: $next[0], direction: direction })
if ($next.hasClass('active')) return
@@ -159,11 +159,11 @@
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('carousel')
var data = $this.data('bs-carousel')
var options = $.extend({}, Carousel.DEFAULTS, typeof option == 'object' && option)
var action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (!data) $this.data('bs-carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
@@ -181,6 +181,7 @@
return this
}
// CAROUSEL DATA-API
// =================