I have a bootstrap dropdown list and I'm looking to modify the icon displayed (icon-deafult) in the button when I open the drop down (to icon-active). Here's the current code:
<div id="Menu" class="dropdown">
<a class="btn btn-default" id="MyButton" data-toggle="dropdown" role="button">
<i class="icon-default"></i>
</a>
<ul class="dropdown-menu" role="menu">
<li>...</li>
<li>...</li>
</ul>
</div>
.icon-default {
content: url("path/path/cool.svg");
background-size: cover;
}
.icon-active {
content: url("path/path/hot.svg");
background-size: cover;
}
I attempted using .open > .icon-default {...}
but it didn't work. Am I on the right track? Is there a method to achieve this without writing new scripts, possibly utilizing existing CSS or bootstrap features?