mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
fix multi carousel bug #3194
This commit is contained in:
parent
555a3b0478
commit
3a751a63d4
3
docs/assets/js/bootstrap-carousel.js
vendored
3
docs/assets/js/bootstrap-carousel.js
vendored
@ -144,9 +144,10 @@
|
||||
var $this = $(this)
|
||||
, data = $this.data('carousel')
|
||||
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
||||
, action = typeof option == 'string' ? option : options.slide
|
||||
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 if (action) data[action]()
|
||||
else if (options.interval) data.cycle()
|
||||
})
|
||||
}
|
||||
|
3
docs/assets/js/bootstrap.js
vendored
3
docs/assets/js/bootstrap.js
vendored
@ -388,9 +388,10 @@
|
||||
var $this = $(this)
|
||||
, data = $this.data('carousel')
|
||||
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
||||
, action = typeof option == 'string' ? option : options.slide
|
||||
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 if (action) data[action]()
|
||||
else if (options.interval) data.cycle()
|
||||
})
|
||||
}
|
||||
|
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
3
js/bootstrap-carousel.js
vendored
3
js/bootstrap-carousel.js
vendored
@ -144,9 +144,10 @@
|
||||
var $this = $(this)
|
||||
, data = $this.data('carousel')
|
||||
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
||||
, action = typeof option == 'string' ? option : options.slide
|
||||
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 if (action) data[action]()
|
||||
else if (options.interval) data.cycle()
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user