Introduce custom Jekyll tags for better glossary integration

This commit is contained in:
Jessica Yao
2017-10-17 18:23:17 -07:00
committed by Andrew Chen
parent 8ff083b0f3
commit 46d9cbe5ae
51 changed files with 546 additions and 197 deletions
+15
View File
@@ -0,0 +1,15 @@
$( document ).ready(function() {
// Shows permalink when term name is hovered over
$(".glossary-injector").each(function() {
var placeholder = $("#" + $(this).data("placeholder-id"));
var originalContent = placeholder.html();
var glossaryDef = $($(this).find(".injector-def")[0]).html();
$(this).mouseenter(function() {
placeholder.html(glossaryDef);
}).mouseleave(function(){
placeholder.html(originalContent);
});
});
});