I need to get margin-top of an input with JavaScript. This is the jQuery code which works fine:
margin-top
input
alert($(\"#input\").css(\'margin-to
I just found a solution:
var style = window.getComputedStyle(document.getElementById('input')); var marginTop = style.getPropertyValue('margin-top'); alert(marginTop);