Skip to content

Commit

Permalink
5-modul
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay committed Sep 2, 2024
1 parent 98b278e commit c7bf00d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 4-module/3-task/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function highlight(table) {
row.classList.add ('female');
}
if (parseInt (ageCell.textContent) < 18) {
ageCell.style.textDecoration = 'line-through';
row.style.textDecoration = 'line-through';
}
});// ваш код...
}
10 changes: 9 additions & 1 deletion 5-module/2-task/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
function toggleText() {
// ваш код...
const button = document.querySelector ('.toggle-text-button');
const textElement = document.getElementById ('text');
button.addEventListener ('click', function () {
if (textElement.hasAttribute ('hidden')) {
textElement.removeAttribute ('hidden');
} else {
textElement.setAttribute ('hidden', true);
}
});// ваш код...
}

0 comments on commit c7bf00d

Please sign in to comment.