Como alternar o FA FA-Caret-Down e o FA FA-Caret-up usando o 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');
                }
            });
        });
Nutty Narwhal