Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zmorok committed May 2, 2024
2 parents 45d5648 + 2bfc710 commit 6ce523a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h1>Каталог</h1>

<script src="src/slider.js"></script>
<script src="src/sidebar.js"></script>
<script src="src/footer.js"></script>
<script src="src/footerIndex.js"></script>

</body>

Expand Down
16 changes: 16 additions & 0 deletions src/footerIndex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
document.addEventListener('DOMContentLoaded', function () {
const getData = () => {
const footer = document.querySelector('footer')
const xhttp = new XMLHttpRequest()
xhttp.open('GET', 'footer.xml', true)
xhttp.send()
xhttp.onload = function () {
const xmlData = this.responseXML
const footerXML = xmlData.querySelector('.footer-container')
footer.appendChild(footerXML)
footer.innerHTML += `<div class="copyright"><p>&#169; 2024 TradeUnity. Все права защищены.</p></div>`
}
}

getData()
})

0 comments on commit 6ce523a

Please sign in to comment.