If the URL ends: ?style=product I want to add a class of active to the li with the class of product
?style=product
active
li
product
HTML:
<
You could get the current url in jQuery like this:
$(location).attr('href');
Then cut off everything after '?' with a regex, to get yor current page
To add a class to the correct li-item:
$('li.'+style+').addClass('active');