Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added 'hoverStay': true|false option... #112

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
6 participants

Added option 'hoverStay': true|false to tipsy..

Useful if you want the tipsy to stay if your mouse is hovering above it.

e.g. when you have 'html' set to true and you have embedded a link in the text of your tipsy...

Added 'hoverStay':true|false option... Useful for when you want the t…
…ipsy to stay if you mouse is hovering above it. e.g. when you have 'html' set to true and you have embedded a link in the text of your tipsy...

rauchg commented Jul 31, 2012

+100

dkimbell13 added some commits Aug 23, 2012

Update src/javascripts/jquery.tipsy.js
Implemented bug fix of IE redundant title hoverovers
Update src/javascripts/jquery.tipsy.js
Fixed redundant IE double tip from title on 'live' tipsy's

@CloCkWeRX CloCkWeRX commented on the diff Jan 23, 2013

src/javascripts/jquery.tipsy.js
@@ -77,6 +78,11 @@
} else {
$tip.css({visibility: 'visible', opacity: this.options.opacity});
}
+
+ if (this.options.hoverStay) {
+ $tip.find('.tipsy-inner').bind('mouseover',function(){$link.enter($link)});
@CloCkWeRX

CloCkWeRX Jan 23, 2013

Whitespace is mixed here.

I cloned your version to try out your hoverStay feature, and I'm probably doing something pretty dumb, because the tooltip vanishes immediately after my mouse leaves the element I'm hovering over (as I attempt to reach the tooltip in order to hover over it). This is the gist of what I'm doing:

`d3.select("#" + tileID)
    .append("div")
        .attr("class","avatar")
        .attr("id","avatar_" + tileID)
        .attr("title",function(d)
        {
            $(this).tipsy({gravity: 'n'});
            return "test";
        });`

Hopefully, my use of d3.js above is something you are familiar enough with to see what I'm trying to achieve. Thanks!

Owner

dkimbell13 replied Jan 26, 2013

Thanks, I tried it; but I'm still running into the same problem. However, I just tried using it in a different context, and it seemed to work. I'll mess around with it a bit more to see where I was going wrong with my other code.

Scratch that. I think it was an illusion that I actually had it working. I tried going more simple--still no success :/ The tipsy tooltip appears fine when I hover over the span, but it disappears when I try to hover over the tip. Sad day.

<span id='test2' title='tester'>hello yo</span>

<script>
    $('#test2').tipsy({gravity: 'n', hoverStay:true, html:true});
</script>
Owner

dkimbell13 replied Jan 29, 2013

I quick made a page with "Hello world!" (try hovering over it and the resulting tip) Thanks for looking into it.

Can easily access files here: http://cse.unl.edu/~clarsen/public/tipsy_test/

Can see the simple page here: http://cse.unl.edu/~clarsen/public/tipsy_test/hoverStay.html

Muffin,
Looks like it's still having the same problem with the url you provided (http://cse.unl.edu/~clarsen/public/tipsy_test/hoverStay.html)?

@jw2013 jw2013 referenced this pull request Jul 12, 2013

Closed

Tipsy hover stay? #161

Thank you for this, works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment