first commit
This commit is contained in:
41
templates/instytut_dendrologii_/js/mod22.js
Normal file
41
templates/instytut_dendrologii_/js/mod22.js
Normal file
@@ -0,0 +1,41 @@
|
||||
window.addEventListener('load', () => {
|
||||
setIDtable();
|
||||
})
|
||||
|
||||
function setIDtable() {
|
||||
var liczba = 0;
|
||||
|
||||
console.log('działa to ten');
|
||||
document.querySelectorAll('table tr ').forEach(td => {
|
||||
liczba++
|
||||
td.setAttribute('id', 'row'+liczba);
|
||||
|
||||
})
|
||||
document.querySelectorAll('table tr:not(:first-child) td:nth-child(2)').forEach(td => {
|
||||
|
||||
td.setAttribute('class', 'photo');
|
||||
|
||||
})
|
||||
document.querySelectorAll('table tr:not(:first-child) td:nth-child(6)').forEach(td => {
|
||||
|
||||
td.setAttribute('class', 'kategoria');
|
||||
|
||||
})
|
||||
document.querySelectorAll('table tr:not(:first-child) td:nth-child(7)').forEach(td => {
|
||||
|
||||
td.setAttribute('class', 'kategoria1');
|
||||
|
||||
})
|
||||
document.querySelectorAll('table tr:not(:first-child) td:nth-child(8)').forEach(td => {
|
||||
|
||||
td.setAttribute('class', 'powiekszenie');
|
||||
|
||||
})
|
||||
document.querySelectorAll('table tr:not(:first-child) td:nth-child(9)').forEach(td => {
|
||||
|
||||
td.setAttribute('class', 'opis' );
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user