I'm using the following JQuery to insert css transitions into an element when clicked...
$(".menu-item-4828 > a").click(function(){
    $(".sub-menu").css("visibility", "visible");
    $(this).css({
        "-webkit-transform": "rotate(180deg) scale(0)",
        "-moz-transform": "rotate(180deg) scale(0)",
        "transform": "rotate(180deg) scale(0)",
        "-webkit-transition": "-webkit-transform 0.3s ease-in", 
    });
However this will only rotate the first time it is clicked, after that it won't rotate anymore. What can I do to make it so that it rotates everytime the element is clicked?
I tried adding and removing the class but this did not work.
 
     
    