How to refresh css changes for the hover effect?

How to refresh css changes for the hover effect?

I have an anchored list of items that when hovered over will add a background and change the color, giving it a highlight effect by toggling a class. Something like this:

    $("#theme li a").hover(function(){
        $(this).addClass('hoverHighlight');
        }, function(){
        $(this).removeClass('hoverHighlight');
    });

When I press one of the anchor items, it runs a function that changes a bunch of css values across the page, including the values of the 'hoverHighlight' class. The thing is after the function runs, all the css changes gets applied (I can see this), but the hover still uses the default values I set in the css file, and not the new ones I set in the function. How do I make it so the hover function refreshes to the new values? Or how else can I achieve this? Thank you in advance.