Results 1 to 8 of 8

Thread: arrow instead of hand on mouse-over link

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default arrow instead of hand on mouse-over link

    1) Script Title: Image w/ description tooltip

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...agetooltip.htm

    3) Describe problem: Hey, I use this script to have a pop-up text, but without link. Therefore is it posible to change the hand (indicating a link) into an arrow, please ?

    I added this in the code, but doesn't work:
    Code:
    <a href="#" onmouseover="doTooltip(event,0)" onmouseout="hideTip()" style="cursor:pointer;"><img src="pics/pic1.jpg" alt="" style="border:1px#222;margin-bottom:20px;"></a>
    This is where you can see the page: http://www.casalplanet.com/apparts.php

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

  3. #3
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    Have you tried changing to this in the doTooltip function:

    HTML Code:
    var tip = startStr + messages[num][0] + midStr + '<span style="cursor:pointer;font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;

  4. The Following User Says Thank You to forum_amnesiac For This Useful Post:

    chechu (09-21-2009)

  5. #4
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Thanks for your reply.
    Doesn't seem to work either.

  6. #5
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    If there is no link do you need to have the cursor at all, you could use <span> instead, if you do want a pointer you can add the default pointer to the span style, you could also underline/highlight the text.

    Create a class for <span>

    HTML Code:
    <style>
    span.tooltip{
    cursor: default;
    }
    </style>
    Then use it like this

    HTML Code:
    <span class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Link 1</span><br>
    <span class="tooltip" onmouseover="doTooltip(event,1)" onmouseout="hideTip()">Link 2</span>
    You could add to the style to highlight the text.

  7. #6
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    I added the html code in the head, and then adjusted the following:
    Code:
    <a href="#" class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">
    Still no result.

  8. #7
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    Use the HTML code in the body section to replace the <a href> part

    instead of :

    HTML Code:
    <a href="#" class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Link 1</a>
    use this :

    HTML Code:
    <span class="tooltip" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Link 1</span>

  9. The Following User Says Thank You to forum_amnesiac For This Useful Post:

    chechu (09-21-2009)

  10. #8
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Works perfectly !
    Sorry I misunderstood you.
    You can see it in full action here: www.casalplanet.com/apparts.php

Bookmarks

Posting Permissions

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