first commit
This commit is contained in:
24
templates/instytut_dendrologii_/js/dendrorepairarticle.js
Normal file
24
templates/instytut_dendrologii_/js/dendrorepairarticle.js
Normal file
@@ -0,0 +1,24 @@
|
||||
window.addEventListener('load' ,() =>{
|
||||
checkdenandrep2();
|
||||
checkdenandrep22();
|
||||
})
|
||||
function checkdenandrep2(){
|
||||
liczba=0;
|
||||
document.querySelectorAll('.grid-dendrocontent .dendro-art .com-content-article p').forEach(dn => {
|
||||
liczba++;
|
||||
dn.id='gxz'+liczba;
|
||||
})
|
||||
}
|
||||
function checkdenandrep22(){
|
||||
document.querySelectorAll('.grid-dendrocontent .dendro-art .com-content-article p').forEach(dn => {
|
||||
if(dn.innerHTML.includes('Dendrob') && dn.innerHTML.includes('vol') && dn.innerHTML.includes(':')){
|
||||
|
||||
var id= dn.id.replace('gxz','');
|
||||
document.querySelector('#gxz'+id).classList.add('grutxz');
|
||||
var id1=id-1;
|
||||
document.querySelector('#gxz'+id1).classList.add('grutz');
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user