I have a span with bootstrap glyphicon glyphicon-plus which collapse on page load. On click expand it alright but my users don’t want to click the plus sign to expand. They want the plus sign changed to minus and the item expanded already on page load. I can change the glyphicon-plus to glyphicon-minus but have to call click event to expand but I don’t want the click event to happen.
$(this).find(".glyphicon-plus").toggleClass(" glyphicon-minus glyphicon-plus");
$(this).click(); // -- -- > expand without this click
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>