hi
I have a div which contains just a image like this :
(div)
(img. …)
(/div)
Now,I want to create a mark in the image ,s I use :
$(div).append((img src =mark.jpg id =mark)).
then set its position :
$(div img#mark).position(…)
Here I don’t know how to set it.
I just want to make the mark’s position within its parent .
In fact ,what I want like the google map ,when you search something in google map ,the results will be marked in the map .
Of course,my require is much easy.
I have thought to get the offset of the parent ,then caculate the really position of the mark image .
But I can’t make it. Any idea ?
Btw ,I ask this in my phone ,so I can’t make a pretty format.
You could use CSS:
And then set the position like this:
Does that do what you meant?