()
| 1 | window.onscroll = function() {myFunction()}; |
| 2 | function myFunction() { |
| 3 | var winScroll = document.body.scrollTop || document.documentElement.scrollTop; |
| 4 | var height = document.documentElement.scrollHeight - document.documentElement.clientHeight; |
| 5 | var scrolled = (winScroll / height) * 100; |
| 6 | document.getElementById("myBar").style.width = scrolled + "%"; |
| 7 | } |
no outgoing calls
no test coverage detected