how to toggle fa fa-caret-down and fa fa-caret-up using jquery code example
Example: how to toggle fa fa-caret-down and fa fa-caret-up using jquery
$(document).ready(function () {
$('.fa-caret-down').on('click', function () {
if ($(this).hasClass('fa-caret-down')) {
$(this).removeClass('fa-caret-down').addClass('fa-caret-up');
}else{
$(this).removeClass('fa-caret-up').addClass('fa-caret-down');
}
});
});