Skip to content

Instantly share code, notes, and snippets.

@cddr
Created July 11, 2013 15:19
Show Gist options
  • Save cddr/5976401 to your computer and use it in GitHub Desktop.
Save cddr/5976401 to your computer and use it in GitHub Desktop.
Annotate a page with a formtastic form
javascript: (function () {
$("label").prepend(function () {
if ($("abbr sup", this).length === 0) {
var annotation = $("<sup>", { "text": $(this).attr("for"),
"style": "color: red" });
return $("<abbr>").append(annotation);
}
})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment