div tag for popup menu
I add a div tag and append it to the body and then 开发者_C百科i add to add items to the div so that it becomes a popup menu. After appending the to body, is there a way to move the div tag. Actually what i want to do is that i want the div to appear wherever the mouse was clicked on the webpage. By the way i am developing a firefox extension. I need some help on this.
This quirksmode article is a great start when looking for help with mouse (x,y) coordinates.
Once you compute the coordinates, you can then use that information to position the div element on the page using css.
You want to use the position:absolute style, along with left: and top:.
精彩评论