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
  • #19813
Closed
Open
Issue created Apr 27, 2016 by Administrator@rootContributor

data-target with multiple target doesn't work

Created by: stassinari

When trying to use multiple targets with the data-target attribute, it seems like only the first one is triggered and the remaining ones are discarded. This happens with either a class targeting multiple elements, or with multiple IDs as attribute value.

I've created two pens on CodePen to reproduce the behaviour. The HTML is identical, but the configuration points to different Bootstrap versions:

v4 with bug: http://codepen.io/stassinari-andiamo/pen/jqvgPW v3 working: http://codepen.io/stassinari-andiamo/pen/dMqxYj

There's a (closed) issue raised for version 3.2.0 (#18342 (closed)), where another user finds this behaviour in v4. There's a snippet of code in there, pointing to the actual JS code responsible for the handling.

I hope this feature will be kept (unlike @cvrebert), because being able to target multiple elements without the use of JavaScript is a nice feature, IMO.

Assignee
Assign to
Time tracking