Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js add margin with variable

var players = document.getElementsByClassName('player');
for(var i = 0; i < players.length; i++)
    players[i].style.marginTop = playerPosition+"px";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #add #margin #variable
ADD COMMENT
Topic
Name
1+3 =