first commit
This commit is contained in:
35
templates/instytut_dendrologii_/js/mod12.js
Normal file
35
templates/instytut_dendrologii_/js/mod12.js
Normal file
@@ -0,0 +1,35 @@
|
||||
window.addEventListener('load', () => {
|
||||
hasSupport();
|
||||
})
|
||||
function hasSupport(){
|
||||
|
||||
document.querySelectorAll('.arboretum .jt-inner p').forEach(items => {
|
||||
|
||||
if(items.innerHTML.includes('img')){
|
||||
items.setAttribute('id','mozmr');
|
||||
|
||||
|
||||
}else {
|
||||
|
||||
items.setAttribute('id','notmozmr');
|
||||
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
console.log('Działa arboretum');
|
||||
|
||||
|
||||
document.querySelectorAll('#mozmr').forEach(mozmr => {
|
||||
|
||||
mozmr.classList.add('mozar');
|
||||
|
||||
})
|
||||
|
||||
document.querySelectorAll('#notmozmr').forEach(mozmr => {
|
||||
|
||||
mozmr.classList.add('notmozmr');
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user