Skip to content

Instantly share code, notes, and snippets.

@lenagroeger
Created June 2, 2014 18:04
Show Gist options
  • Save lenagroeger/7839b7eacf6accf48840 to your computer and use it in GitHub Desktop.
Save lenagroeger/7839b7eacf6accf48840 to your computer and use it in GitHub Desktop.
tooltip
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