carousel js does not read data-* options on initialization
Created by: ratbeard
Hello. From the docs[1]:
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-interval="".
I do not see this implemented in the source [2]. Only default values and passed in js options are used. We would like this for data-interval
.
I can submit a patch to fix this. I presume I should implement it the same as modal[3], and just grab all potential data properties off the object (not grab only 'interval' and 'pause')?
[1] http://twitter.github.com/bootstrap/javascript.html#carousel [2] https://github.com/twitter/bootstrap/blob/master/js/bootstrap-carousel.js#L146 [3] https://github.com/twitter/bootstrap/blob/master/js/bootstrap-modal.js#L203
JS FIDDLE THAT SHOWCASES THE PROBLEM: