I've used some clever selectors to make two radio buttons either hide or show a div using Bootstrap's data-toggle="collapse" tool.
If I click "Show", the div appears, and if I click "Hide", it collapses.
But if, while the div is visible, I click "Hide" then "Show" again very quickly, "Show" is checked, but the div is not visible.
I'm very happy with using data-* attributes instead of custom Javascript... is there a way to prevent these "conflicting animations", if that is what they are?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
<input id="rbone"
type="radio"
name="group"
data-toggle="collapse"
data-target="#thing:not(.show)" />
<label for="rbone">Show</label><br />
<input id="rbtwo"
type="radio"
name="group"
data-toggle="collapse"
data-target="#thing.show" />
<label for="rbtwo">Hide</label>
<div id="thing" class="collapse">Nothing to see here.</div>