Collapse doesn't work if id contains dot
See original GitHub issueHello
Collapse doesn’t work if id contains dot.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<title>Hello, world!</title>
</head>
<body>
<div class="accordion" id="accordion">
<div class="card">
<div class="card-header">
<h5 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapse.One">
Collapsible Group Item #1
</button>
</h5>
</div>
<div id="collapse.One" class="collapse show" data-parent="#accordion">
<div class="card-body">
xxx
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<h5 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapse.Two">
Collapsible Group Item #2
</button>
</h5>
</div>
<div id="collapse.Two" class="collapse" data-parent="#accordion">
<div class="card-body">
yyy
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
</body>
</html>
Please fix the bug. Thank you.
– Mykola
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Can't show the element when its class or id contains dots
Class is given. Then I put it in array like info['id'] and it is equal dfv.png . Then I need to make it...
Read more >Collapse and other navigation options are now Dots
Hi. Turned on my computer this morning and I now have dots instead of the normal +- collapse and x buttons.
Read more >MVD Self-Service Tag Kiosk - FAQ
MVD Self-Service Tag Kiosk - FAQ ... What can I do at a kiosk? You can renew eligible vehicle tags and pay insurance...
Read more >Colony Collapse Disorder | US EPA
The number of hives that do not survive over the winter months – the overall indicator for bee health – has maintained an...
Read more >Frequently Asked Questions | Republic Services
You can verify employment by contacting the Work Number via phone: ... What if I have questions about my bill or think there...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You have to escape your selector that’s what jQuery said by :
and it’ll be fine 😉
Everything passed in our
data-target
attribute is passed to jQuery as a selectorWe made that in a previous PR but finally we reverted that because it’s too hard to detect correctly special selectors.
See:
We added a quick note in our documentation see: https://getbootstrap.com/docs/4.1/getting-started/javascript/#escaping-selectors