I have the following code:
In my html
<h1 id="heading">My Site</h1>
In my css
#heading{
font-size: 16px;
color: #333333;
}
When in console I do
document.getElementById("heading").style.fontSize
it gives: ""
but when I do
$("#heading").css("fontSize")
it gives: 16px
Even if I print the whole style object, vanilla javascript shows all blank values but jquery shows correct results.
Why is there a difference between the two?