Skip to content

Instantly share code, notes, and snippets.

@tie-rack
Created March 28, 2011 19:13
Show Gist options
  • Save tie-rack/891067 to your computer and use it in GitHub Desktop.
Save tie-rack/891067 to your computer and use it in GitHub Desktop.
dotjs for adding the title text of XKCD comics on the page (no more tooltip for me!)
var comic = $("div.s img[title]");
var titleP = $("<p></p>");
titleP.css({"font-variant": "normal",
"border": "1px solid yellow",
"padding": "1em",
"background-color": "#FFFFCC"});
titleP.text(comic.attr("title"));
comic.after(titleP);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment