css class as variable

css class as variable

    Hello, i just don´t know the right syntax for this:
    i want to change the css class of the li element from the name hidden to the variable filterVal, but i don´t know the right syntax. Any help? thanks

    1. var filterVal = $(this).text().toLowerCase().replace(' ','-');


    2. $('ul#portfolio li.hidden +').hover(