1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-15 10:05:40 +02:00
This commit is contained in:
fat
2013-07-17 21:08:50 -07:00
parent 0f64c21049
commit eb3333a612
4 changed files with 11 additions and 10 deletions

View File

@@ -189,12 +189,13 @@
var $this = $(this), href
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
var options = $.extend({}, $target.data(), $this.data())
var slideIndex
var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false
$target.carousel(options)
if (slideIndex = $this.attr('data-slide-to')) {
$target.data('bs.carousel').pause().to(slideIndex).cycle()
$target.data('bs.carousel').to(slideIndex)
}
e.preventDefault()