Quantcast
Channel: Bootstrap 3 collapse change chevron icon on click - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by royse41 for Bootstrap 3 collapse change chevron icon on click

$
0
0

The problem is with your jQuery code not being correct.

You're closing the event handler function early on this line:

$('#serviceList').on('shown.bs.collapse'), function() {

See that second closing parenthesis? That's closing the 'on' function early. Try changing your jQuery to look like this:

$('#serviceList').on('shown.bs.collapse', function() {    $(".servicedrop").addClass('glyphicon-chevron-up').removeClass('glyphicon-chevron-down');  });$('#serviceList').on('hidden.bs.collapse', function() {    $(".servicedrop").addClass('glyphicon-chevron-down').removeClass('glyphicon-chevron-up');  });

Viewing all articles
Browse latest Browse all 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>