Css remote rollover

Discussion in 'CSS' started by kuttappan, May 22, 2010.

  1. #1
    Hi guys, maybe you could help me about remote rollover. I want to create a text link, and when i rollover that link there's some text appearing somewhere else... Many thanks.
     
    kuttappan, May 22, 2010 IP
  2. CooganA

    CooganA Peon

    Messages:
    12
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    My suggestion to you is to use jquery to achieve this.

    Include the jquery plugin in your <head> tag like so and use the jquery script i put together.

    <head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

    <script type="text/javascript">

    $(document).ready(function(){
    $("#myLink").hover(
    function () {
    $("#myText").show();
    },
    function () {
    $("#myText").hide();
    }
    );
    });.

    </script>
    </head>

    <a href="/page" id="myLink">Home</a>

    <div id="#myText">You hovered over the home link</div>

    And in your styles set myText to display none.

    #myText {
    display: none;
    }

    Hope this help and is what you wanted.
     
    CooganA, May 22, 2010 IP