Skip to content

Instantly share code, notes, and snippets.

@chylex
Last active July 11, 2017 13:52
Show Gist options
  • Save chylex/809434cc2568ccf7d51dec1295e644f9 to your computer and use it in GitHub Desktop.
Save chylex/809434cc2568ccf7d51dec1295e644f9 to your computer and use it in GitHub Desktop.
$(".js-app").on("mouseenter", "a[data-user-name]", function(){
TD.cache.twitterUsers.getByScreenName($(this).attr("data-user-name")).addCallback(n => $TD.displayTooltip(n.name, false))
}).on("mouseenter", "a[rel=user]", function(){
$TD.displayTooltip($(this).attr("href").replace(/.*\//, "@"), false);
}).on("mouseleave", "a[data-user-name], a[rel=user]", e => $TD.displayTooltip(null, false));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment