1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 04:51:39 +02:00

change namespace back to dot notation and someother js shizzle

This commit is contained in:
fat
2013-05-16 20:19:51 -07:00
parent 5ab72f7687
commit 140ef2320b
22 changed files with 105 additions and 103 deletions

View File

@@ -111,7 +111,7 @@
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
var e = $.Event('bs:carousel:slide', { relatedTarget: $next[0], direction: direction })
var e = $.Event('slide.bs.carousel', { 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('bs-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('bs-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()