Hey Dennis,
I cant seem to get it to work. I copy and pasted your code, changed parts with caps, and it just showing the home tab selected. My link is...
<a href="index.php?route=information/information&information_id=6" id="tab_articles">Articles</a>
and my code is....
$(document).ready(function() {
route = getURLVar('route');
var loc = window.location;
if (!route) {
if (loc == '
http://freetrition.com/opencart/index.p ... ation_id=6') {
$('#tab_articles').addClass('selected');
} else {
$('#tab_home').addClass('selected');
}
} else {
part = route.split('/');
if (route == 'common/home') {
$('#tab_home').addClass('selected');
} else if (route == 'account/login') {
$('#tab_login').addClass('selected');
} else if (part[0] == 'account') {
$('#tab_account').addClass('selected');
} else if (route == 'checkout/cart') {
$('#tab_cart').addClass('selected');
} else if (part[0] == 'checkout') {
$('#tab_checkout').addClass('selected');
} else {
$('#tab_home').addClass('selected');
}
}
});
Any ideas? Thanks for the help btw