I created this FIDDLE to see if what I was doing was right or wrong. Apparently it's wrong:
My goal here is to JavaScript assign CSS values to an HTML element, in this case the value top
.
Based on the response from this problem which I found, but I do not even have the intended end result that was for div
100px
below.
JAVASCRIPT
var altura = 100;
$("#footer").css("top", altura + "px");
HTML
<div id = "footer">
</div>
CSS
#footer {
height: 100px;
background-color: grey;
}