There is a code to change the class:
$(function() { $("#drop").click(function() { $("#plus").toggleClass("round-405"); }) }); It is executed by clicking on the drop-down menu button (bootstrap).
The problem is that the drop-down menu takes longer and can not be undone. And if at the time of the dropout click on the button again, the function will work again and the class will change without changing the menu.
How can I make a delay between the triggering of this function without getting into bootstrap.js?
Markup:
<a id="drop" class="btn btn-primary btn-block" role="button" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> <span class="menu-title">Показать категории</span> <span class="category-icon"><i id="plus"class="fa fa-plus"></i></span> </a>