Web Analytics Made Easy -
StatCounter selection() - CodingForum

Announcement

Collapse
No announcement yet.

selection()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • selection()

    Hi,

    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

    Chris

  • #2
    Try this
    Code:
    <a href="javascript:void(0)"><span>Text</span></a>
    and then put in the head
    Code:
    <STYLE TYPE="text/css" TITLE="">
    a:hover {color:red;}
    </STYLE>

    Comment

    Working...
    X