Jump to content

Manipulating Background Position.


Shade

Recommended Posts

var a =  document.getElementById('mydiv').style.BackgroundPosition;

returns "10px 20px", probably a string. so, how to get x and y values for two variables ?like var x = x-position(10) var y = y-position(20)as integers to manipulate with ??a little function to extract and assign the two integer values to my choice of variables ??

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...