Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: selection()

  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 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
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •