Created
April 16, 2021 12:28
-
-
Save flinhong/bc6b3807789d8605a7ff3fc5129754b8 to your computer and use it in GitHub Desktop.
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
// footnote with protip | |
function footNote() { | |
if ($(".footnote").length != 0) { | |
$(".footnote").each(function () { | |
var target = $(this) | |
.attr("href") | |
.replace(":", "\\:"); | |
var content = | |
$(target) | |
.html() | |
.split(" ")[0] + "</p>"; | |
$(this).addClass("protip"); | |
$(this).attr({ | |
"data-pt-title": content, | |
"data-pt-position": "bottom", | |
"data-pt-scheme": "dark-transparent" | |
}); | |
}); | |
$.protip(); // initial protip.js | |
} else if ($(".protip").length != 0) { | |
$.protip(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment