Forum Moderators: open
The accordion script uses location.href to find out what section one is in, so that the other sections in the navbar can be collapsed. But, the content of the navbar (a definition list) is generated by the CMS, populated with links such as "index.php?=id=201". Apparently, location.href doesn't understand past the "index.php" part.
Any ideas on how to make the script understand what page I'm on? Any help would be greatly appreciated.
Excerpt below:
if ( settings.navigation ) {
var current = this.find("a").filter(function() { return this.href == location.href; });
if ( current.length ) {
if ( current.filter(settings.header).length ) {
settings.active = current;
} else {
settings.active = current.parent().parent().prev();
current.addClass("current");
}
}
}
[edited by: Sheynberg at 4:45 am (utc) on Nov. 30, 2007]