Updated href used to find blog navigation item

Due to pagination, the first page of the blog is routed to "/blog1.html"
and this href is used in the navigation as well. Thus to set the blog
navigation menuitem to active, the href needed to be updated.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
This commit is contained in:
Collin J. Doering 2015-08-16 02:57:43 -04:00
parent fda34f13e9
commit a37aedc45b
1 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ _paq.push(['enableLinkTracking']);
ajaxCallbacks: {
beforeSend: function () {
$('#nav-menu li.active').removeClass('active');
$('#nav-menu li a[href="/blog.html"]').parent('li').addClass('active');
$('#nav-menu li a[href="/blog1.html"]').parent('li').addClass('active');
}
}
},
@ -60,7 +60,7 @@ _paq.push(['enableLinkTracking']);
ajaxCallbacks: {
beforeSend: function () {
$('#nav-menu li.active').removeClass('active');
$('#nav-menu li a[href="/blog.html"]').parent('li').addClass('active');
$('#nav-menu li a[href="/blog1.html"]').parent('li').addClass('active');
}
}
},
@ -69,8 +69,8 @@ _paq.push(['enableLinkTracking']);
ajaxCallbacks: {
beforeSend: function () {
// Set the blog menuitem as active
$('a.menuitem[href="/blog.html"]').closest('ul').find('li.active').removeClass('active');
$('a.menuitem[href="/blog.html"]').closest('li').addClass('active');
$('a.menuitem[href="/blog1.html"]').closest('ul').find('li.active').removeClass('active');
$('a.menuitem[href="/blog1.html"]').closest('li').addClass('active');
}
}
},