Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #5279
Closed
Open
Issue created Sep 25, 2012 by Administrator@rootContributor

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:

http://jsfiddle.net/vm9vX/1/

Assignee
Assign to
Time tracking