From 2d092dfeea969d82bc55a153c6a597a3e87a0a03 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 2 Jan 2012 16:04:01 -0800 Subject: start playing with carousel stuff --- js/bootstrap-carousel.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index ed4b8f3fa..2e1fde11a 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -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 () { + + } + } -- cgit v1.2.3