Hello Developers,
i have a link structure like this on my website...
index.php - homepage
index.php?section= - other pages
here is a piece of code that i wrote to change the colour of the active link...
$(function(){
var path = location.pathname.substring(1);
if ( path )
$('#nav ul#navigation li a[href$="' + path + '"]').attr('class', 'selected');
});
but this doesn't take into account of php link structures, only flat file links. How would i get this working for links like "index.php?section=" aswell as the basic links like "index.php"?.
Kind Regards,
Nathaniel Blackburn