Hello, i'm making portfolio site template. I have problem about "active link" for my full ajax site.
When i open url (http://bit.ly/d5qNeN) directly, url doesnt come up with addClass
function.
How can i add 'selected' class for directly opened urls?
Here is my jquery code, which adds 'selected' class to my navi bar.
$j("a[rel='history']").click(function(){
$j("a[rel='history']").addClass('selected').not(this).removeClass('selected');
// Get the hash from the link that was clicked
// jQuery.history.load("new-hash-value");
var hash = $j(this).attr('href');
hash = hash.replace(/^.*#/, '');
// Load this hash with the history plugin
$j.historyLoad(hash);
$j('#load').fadeIn('normal');
if(!$j('#load').get(0)) {
$j('#content').append('<div id="load"></div>');
}
return false;
});