first commit
This commit is contained in:
23
templates/instytut_dendrologii_/js/dendrobold.js
Normal file
23
templates/instytut_dendrologii_/js/dendrobold.js
Normal file
@@ -0,0 +1,23 @@
|
||||
window.addEventListener('load', () => {
|
||||
bolddenmenu();
|
||||
})
|
||||
function bolddenmenu(){
|
||||
var link=window.location.href;
|
||||
document.querySelectorAll('.dendro-menu ul li a').forEach(ils => {
|
||||
if(link.includes(ils.href)){
|
||||
ils.style.setProperty('font-weight','800');
|
||||
ils.parentNode.style.setProperty('font-weight','800');
|
||||
ils.parentNode.parentNode.style.setProperty('font-weight','800');
|
||||
ils.parentNode.parentNode.parentNode.style.setProperty('font-weight','800');
|
||||
ils.closest('ul').parentNode.children[0].style.setProperty('font-weight','800');
|
||||
ils.closest('ul').parentNode.parentNode.children[0].style.setProperty('font-weight','800');
|
||||
}
|
||||
|
||||
})
|
||||
if(link.includes('vol')){
|
||||
document.querySelector('.dendro-menu ul li:nth-child(2) a').style.setProperty('font-weight','800');
|
||||
}
|
||||
if(link.includes('review')){
|
||||
document.querySelector('.dendro-menu ul li:nth-child(3) a').style.setProperty('font-weight','800');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user