View Full Version : selection()

04-06-2009, 04:08 PM

I am creating an extension in firefox. The user selects some text and when he/she clicks a button, a set of span tags are inserted around that selected text.
I am trying to implement, that when the user hovers over that selected text, it get highlighted again (preferably a differnt color) - very similar to when the user clicks and drags the mouse over some text.

This way I can use the getselection function to get the text the user hovered over.

any ideas?

Kind regards


04-08-2009, 02:37 AM
Try this

<a href="javascript:void(0)"><span>Text</span></a>
and then put in the head

<STYLE TYPE="text/css" TITLE="">
a:hover {color:red;}