mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
reset carousel in the case that it is reinstantiated twice
This commit is contained in:
parent
6b67a83631
commit
5abe33f5d8
2
js/bootstrap-carousel.js
vendored
2
js/bootstrap-carousel.js
vendored
@ -164,7 +164,7 @@
|
|||||||
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
||||||
if (typeof option == 'number') data.to(option)
|
if (typeof option == 'number') data.to(option)
|
||||||
else if (action) data[action]()
|
else if (action) data[action]()
|
||||||
else if (options.interval) data.cycle()
|
else if (options.interval) data.pause().cycle()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user