diff --git a/01/app.js b/01/app.js index 1c9992e..c9b7786 100644 --- a/01/app.js +++ b/01/app.js @@ -1 +1,11 @@ -console.log('DOM'); \ No newline at end of file +console.log('DOM'); +let sum = 0; +const commentsItems = document.querySelector('.comments__item.comments__item--newest'); +if (commentsItems) { + console.log(commentsItems); + const dataInfoElements = commentsItems.querySelectorAll('[data-info]'); + if (dataInfoElements) { + console.log('data-info wystepuje ' + dataInfoElements.length + ' razy'); + } + } + diff --git a/02/app.js b/02/app.js index 1c9992e..7ea840c 100644 --- a/02/app.js +++ b/02/app.js @@ -1 +1,15 @@ -console.log('DOM'); \ No newline at end of file +console.log('DOM'); +const aList = document.querySelectorAll('a'); +if (aList) { + const dataUrl = document.querySelectorAll('[data-url]'); + dataUrl.forEach(function (item) { + const link = item.getAttribute('data-url'); + console.log(item) + + item.setAttribute('href', link) + }); + + +} + + diff --git a/03/app.js b/03/app.js index c299ca3..395c309 100644 --- a/03/app.js +++ b/03/app.js @@ -1,14 +1,77 @@ +// Utwórz element