Jump to content

[SOLVED] Javascript tooltip problems


mkr365

Recommended Posts

Hello,

 

I have a few problems with the Javascript tooltip script wich i'm running on my site. When you hit a certain link then a balloon with text pops up. But I want the balloon to pop up when i'm hitting on a image, and that is something that i cannot fix.

 

Another problem is that when my balloon pops up it comes underneath the other images and it should be over the other images.

 

Can somebody help me with my code  :)

 

<script type="text/javascript" src="lib/prototype/prototype.js"></script>
        <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js"></script>
        <script type="text/javascript" src="src/HelpBalloon.js"></script>
        <script type="text/javascript">
        <!--
        //
        // Override the default settings to point to the parent directory
        //
        HelpBalloon.Options.prototype = Object.extend(HelpBalloon.Options.prototype, {
            icon: \'images/icon.gif\',
            button: \'images/button.png\',
            balloonPrefix: \'images/balloon-\'
        });
       
        //-->
        </script>

<a href="#" id="ballon" onclick="return false;">img src="images/test.gif"</a>
<script type="text/javascript">
    new HelpBalloon({
        title: \'Mouseover Balloon\',
        content: \'test tekst ballon \'
            + \'balloon content.\',
        icon: $(\'ballon\')
    });
</script>

Link to comment
Share on other sites

I already have the solution:

 

<img src="images/test.gif" style="cursor:pointer" alt="tooltip" id="ballon" onclick="return false;"/>

<script type="text/javascript">

new HelpBalloon({

title: \'Mouseover Balloon\',

content: \'Collin is een aap \'

+ \'.\',

icon: $(\'ballon\')

 

});

</script>

 

And the balloon pops up underneath other images was a result of a  z-index:1 that shouldn't be there.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.