I am trying to add a class to a div that has a class with a variable name. This is the code I am using:
if ($('div').hasClass(this.filterSelection)) {
$(this).addClass('highlightMenu');
}
The 'this' isn't doing what I want it to, but I don't know what to put in its place. Any ideas will be much appreciated.