mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 16:44:17 +02:00
start playing with carousel stuff
This commit is contained in:
21
js/bootstrap-carousel.js
vendored
21
js/bootstrap-carousel.js
vendored
@@ -25,12 +25,29 @@
|
||||
/* CAROUSEL CLASS DEFINITION
|
||||
* ========================= */
|
||||
|
||||
var Carousel = function () {
|
||||
|
||||
var Carousel = function (element) {
|
||||
this.$element = $(element)
|
||||
this.cycle()
|
||||
}
|
||||
|
||||
Carousel.prototype = {
|
||||
|
||||
cycle: function () {
|
||||
this.interval = setInterval($.proxy(this.right, this), 500)
|
||||
}
|
||||
|
||||
, pause: function () {
|
||||
clearInterval(this.interval)
|
||||
}
|
||||
|
||||
, right: function () {
|
||||
|
||||
}
|
||||
|
||||
, left: function () {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user