Created
June 2, 2014 18:04
-
-
Save lenagroeger/7839b7eacf6accf48840 to your computer and use it in GitHub Desktop.
tooltip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tooltip = $("#tooltip"); | |
| tooltip.hide() | |
| var bar = $(".bar"); | |
| bar.hover(function(e) { | |
| tooltip.show() | |
| $(this).addClass("active"); | |
| var text = $(this).html(); | |
| tooltip.html(text); | |
| }, function (e) { | |
| $(this).removeClass("active"); | |
| }).mousemove(function(e) { | |
| scrubber.offset({ top: e.pageY+2 }); | |
| tooltip.offset({ top: e.pageY+3 }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment