Page 1 of 1

How To Active Highlight Tab With Same Route

Posted: Sun Feb 19, 2012 8:18 pm
by jefrey1983
Hi
My problem is i can't seem to highlight two information page.
test site: helikungfu[dot]com
Using Version 1.4.9

the Home, Get To know , New Items and Special work fine because they have different route but when i add another route like

Code: Select all

else if (route == 'information/information') {
			$('#tab_lessons').addClass('selected');
it will stop working

Code: Select all

$(document).ready(function() {
	route = getURLVar('route');
	
	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');
		
		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'information/information') {
			$('#tab_gtknow').addClass('selected');
		} else if (route == 'product/special') {
			$('#tab_specials').addClass('selected');
} else if (route == 'product/category') {
			$('#tab_nitems').addClass('selected');
		
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
Please help :-*

Re: How To Active Highlight Tab With Same Route

Posted: Tue Feb 21, 2012 2:04 am
by jefrey1983
Short Version.
I want something similar to opencart.com tab when click it gets highlighted