Created
November 27, 2013 19:34
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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