Answers for "how to toggle fa fa-caret-down and fa fa-caret-up using jquery"

0

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');
                }
            });
        });
Posted by: Guest on November-10-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language