0

I'm trying to get a tooltip staying up when hoovered, but I don't know anything to identify it by. Is there some way that I can find any identifier, so that I can have it close on mouseout instead of mouseout of the link?

It is related to my other question (which is more specific about tooltipsy): How to make tooltipsy staying so a link in it can be clicked

Edit: I'm using Tooltipsy to create the tooltips (but I might change if someone can suggest another jQuery plugin that can do this for me.

What I want is for the tooltip to stay if I have the mouse on it, instead of it disappearing when the mouse leaves the element invoking the tooltip. The tooltip should contain clickable links.

js:

# NOTE: The hide property is only for me to make it stay longer, so that the links are clickable. It is not an accepted soloution.
$('.order_tooltip').tooltipsy({
    delay: 0,
    offset: [0,-1],
    hide: function (e, $el) { 
        window.setTimeout(
            function() {
                $el.hide();
            },
            1000
        );
    }
});

html:

<a href="/order/ordernr/{{ item.order_nr }}"
    title="Tooltip content" 
    class="order_tooltip" 
>link</a>
Community
  • 1
  • 1
olofom
  • 6,233
  • 11
  • 37
  • 50
  • Please show the code you have so far. How is the tooltip created? – nnnnnn May 28 '12 at 07:28
  • 1
    This question can't be answered without seeing your js code + HTML! – gdoron May 28 '12 at 07:30
  • R u using jquery.tipsy.js ??? and you want to know that how to get tipsy on hover of element?? – Priyank Patel May 28 '12 at 07:31
  • @nnnnnn using the plugin tooltipsy, link in the question, but if you have a better suggestion I'm listening.. – olofom May 28 '12 at 07:55
  • @gdoron I added it, just that I use the plugin so the code creating it doesn't add much... – olofom May 28 '12 at 07:56
  • @PriyankPatel nope, tooltipsy. I want to know how to get the tooltip to stay when leaving the invoking element and hovering the tooltip instead so that I can click the links in the tooltip. – olofom May 28 '12 at 07:57

2 Answers2

0

I didn't manage to get the identifier and couldn't wait so I changed to another tooltip plugin called simpletip that provided the functionality that I needed.

olofom
  • 6,233
  • 11
  • 37
  • 50
0
<a onmouseover="youtipsyobject().show();" onmouseout="youtipsyobject().hide()">link</a>

and make by default hide.

Murtaza Khursheed Hussain
  • 15,176
  • 7
  • 58
  • 83
  • Not really since I don't know youtipsyobject(), that was the problem. – olofom May 28 '12 at 13:35
  • The object seems to be generated with a random string as well so it's probably not possible to do this outside of the class code. – olofom May 28 '12 at 13:55
  • then first you need to know the basics of javascript first. – Murtaza Khursheed Hussain May 29 '12 at 15:01
  • I do know the basics of javascript, I've been working with it for years, but not this kind of plugin integration. I at least know enough not to use onmouseover and onmouseout in a link instead of a handler for these events :) – olofom May 29 '12 at 15:11
  • Although this is a very good tooltip plugin, I used it personally in several projects. http://onehackoranother.com/projects/jquery/tipsy/ hope you find it useful – Murtaza Khursheed Hussain May 29 '12 at 16:58
  • Thanks, I've used it before as well, but this time I found http://craigsworks.com/projects/simpletip/ even more useful. – olofom May 30 '12 at 06:50