I cannot get it to apply the active class when the link is clicked on, what could I be doing wrong?
Here is my HTML:
And here is my JS
$.address.init(function()
{
$('#slides a').address();
}).change(function()
{
$('#slides a').click(function()
{
var address = $.address.value($('#slides a').attr('href'));
alert(address);
if($(this).attr('href') == address)
{
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});
});
also it is returning [object Object] / undefined for the alert….