Skip to content

Instantly share code, notes, and snippets.

@kmelve
Created November 27, 2013 19:34
Show Gist options
  • Save kmelve/7681789 to your computer and use it in GitHub Desktop.
Save kmelve/7681789 to your computer and use it in GitHub Desktop.
jQuery for autogenerating Foundation tooltips from multimarkdown→HTML generated footnotes. First version. Iterations to come.
var notes = []
$('.footnotes p').each(function() {
notes.push($(this).text().replace('↩',''))
});
$('sup').each(function (index) {
$(this).wrap("<span data-tooltip class=\"has-tip\" title=\"" + notes[index] + "\"></span>");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment