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
  • #6271
Closed
Open
Issue created Dec 14, 2012 by Administrator@rootContributor

Timer not being reset in carousel

Created by: tslpublisher

When clicking next just before a the interval has finished it is like you have just skipped an item.

I have come up with a solution for you, instead of

  , next: function () {
      if (this.sliding) return
      return this.slide('next')
    }

  , prev: function () {
      if (this.sliding) return
      return this.slide('prev')
    }

in the prototype, use

  , next: function () {
      if (this.sliding) return
      clearInterval(this.interval)
      this.interval = null
      this.cycle
      return this.slide('next')
    }

  , prev: function () {
      if (this.sliding) return
      clearInterval(this.interval)
      this.interval = null
      this.cycle
      return this.slide('prev')
    }
Assignee
Assign to
Time tracking