Skip to content

Instantly share code, notes, and snippets.

@saikat
Created March 16, 2012 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saikat/2048495 to your computer and use it in GitHub Desktop.
Save saikat/2048495 to your computer and use it in GitHub Desktop.
Bookmarklet to add links in front of all tags with ids
<a href="javascript:(function() { eles = $('*[id]'); eles.each(function(index, element) { var linkName = $(this).attr('id'); var link = $('<a></a>'); link.attr('href', '#' + linkName); link.text('# '); $(this).prepend(link); }); })()">Linkify</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment