Can I specify multiple data targets for Twitter Bootstrap collapse?

前端 未结 7 1386
耶瑟儿~
耶瑟儿~ 2020-12-03 04:26

I\'d like to target two divs for expand when clicking on a single trigger? Is that possible?

7条回答
  •  失恋的感觉
    2020-12-03 05:00

    From the Bootstrap 3 documentation:

    The data-target attribute accepts a CSS selector to apply the collapse to.

    Therefore you can use a comma-separated list of id's, class selector etc. for the data-target attribute value:

    You can see an extensive list of valid CSS selectors on the w3schools website.

提交回复
热议问题