I am working on customizing the semantic-ui sidebar. My goal is to have it minimize to a labeled icon when the toggle button is clicked. However, I am having trouble with the animation and getting the content to be pulled when I minimize it to the labeled icon sidebar.
HTML
<div class="ui left demo vertical inverted visible sidebar menu">
<a class="item">
<i class="home icon"></i>
Home
</a>
<a class="item">
<i class="block layout icon"></i>
Topics
</a>
<a class="item">
<i class="smile icon"></i>
Friends
</a>
</div>
<div class="pusher">
<a href="#" id="toggle-btn">Toggle</a>
</div>
JS
$("#toggle-btn").click(function() {
$(".ui.sidebar")
.toggleClass("labeled icon");
});
Check out the codepen for reference:
http://codepen.io/andhikaribrahim/pen/rWNEzr
Any assistance would be greatly appreciated. Thank you in advance.