편집 요약 없음 |
편집 요약 없음 |
||
8번째 줄: | 8번째 줄: | ||
$(iter).css("position","relative"); | $(iter).css("position","relative"); | ||
$(baloon).html(ref_text); | $(baloon).html(ref_text); | ||
baloon.className = "tooltip bottom"; | baloon.className = "tooltip bottom"; | ||
$(iter).after(baloon); | $(iter).after(baloon); | ||
$(iter).hover( | $(iter).hover( | ||
iter.tooltip = baloon; | |||
function(e) | function(e) | ||
{ | { | ||
var bal = | var bal = this.tooltip; | ||
/*$(bal).css("display","block");*/ | /*$(bal).css("display","block");*/ | ||
$(bal).fadeIn(); | $(bal).fadeIn(); | ||
31번째 줄: | 21번째 줄: | ||
function(e) | function(e) | ||
{ | { | ||
var bal = | var bal = this.tooltip; | ||
/*$(bal).css("display","none");*/ | /*$(bal).css("display","none");*/ | ||
$(bal).fadeOut(); | $(bal).fadeOut(); |
2015년 5월 31일 (일) 11:45 판
var ref_tags = $("[id^=cite_ref]");
$(ref_tags).each(function(index ,iter)
{
var a = $(iter).children("a")[0];
var ref_text = $($(a).attr("href")).children(".reference-text")[0];
var ref_text = $(ref_text).html();
var baloon = document.createElement("div");
$(iter).css("position","relative");
$(baloon).html(ref_text);
baloon.className = "tooltip bottom";
$(iter).after(baloon);
$(iter).hover(
iter.tooltip = baloon;
function(e)
{
var bal = this.tooltip;
/*$(bal).css("display","block");*/
$(bal).fadeIn();
},
function(e)
{
var bal = this.tooltip;
/*$(bal).css("display","none");*/
$(bal).fadeOut();
}
);
});