Sooooo, I'm having a JS problem. I'm fairly new to web development so I'm not entirely sure what I'm doing wrong with my JS.
//create script for #mainHeading focus @ pageload -- heading 1
window.onload = function() {
var mainHeading = document.getElementById("mainHeading");
mainHeading.style.textShadow = '0px 0px 0px #fff'
}
//create script for #subHeading focus @ pageload -- heading 2
window.onload = function() {
var subHeading = document.getElementById("subHeading");
subHeading.style.textShadow = '0px 0px 0px #fff'
}
So basically I wrote the function for my first heading to "focus" when the page loads. Then I decided to add a second heading with the same function. Now when I load my page only the second heading loads and not both.
Why is this??