Say i’ve an value x = 100 and y = 26 with a div height and width equal to 500.
How do i place a text in that x and y co ordinate ?
What is the in built method that does this ?
x=Math.floor(Math.random()*500);
y=Math.floor(Math.random()*500);
I’ve to place text in this x and y co ordinates.
Thanks
Assuming you want to add a new element at a particular position in another element.
You can do this by setting css properties using
.cssfunction in jQuery.container element should have
position:relativeand child elements should haveposition:absolutein cssjsfiddle : http://jsfiddle.net/p5QSd/