MediaWiki:BibleGet.js: Difference between revisions
no edit summary
Johnrdorazio (talk | contribs) No edit summary |
Johnrdorazio (talk | contribs) No edit summary |
||
Line 19: | Line 19: | ||
$bGetTIP = $("div[data-version='"+version+"'][data-ref='"+ref+"']"); | $bGetTIP = $("div[data-version='"+version+"'][data-ref='"+ref+"']"); | ||
console.log('I found ' + $bGetTIP.length + ' div(s) at the bottom of the page with this bible quote'); | console.log('I found ' + $bGetTIP.length + ' div(s) at the bottom of the page with this bible quote'); | ||
$bGetTIP. | $bGetTIP.removeClass('hidden'); | ||
let top = $span.offset().top; | let top = $span.offset().top; | ||
let left = $span.offset().left + $span.outerWidth() + 15; | let left = $span.offset().left + $span.outerWidth() + 15; | ||
Line 36: | Line 36: | ||
$bGetTIP = $("div[data-version='"+version+"'][data-ref='"+ref+"']"); | $bGetTIP = $("div[data-version='"+version+"'][data-ref='"+ref+"']"); | ||
//console.log('I found ' + $bGetTIP.length + ' div(s) at the bottom of the page with this bible quote'); | //console.log('I found ' + $bGetTIP.length + ' div(s) at the bottom of the page with this bible quote'); | ||
setTimeout(function(){ $bGetTIP. | setTimeout(function(){ $bGetTIP.addClass('hidden'); },500); | ||
}); | }); | ||
} else { | } else { | ||
Line 52: | Line 52: | ||
if(data.hasOwnProperty('html')){ | if(data.hasOwnProperty('html')){ | ||
let $bGetTIP = $('<div>', { | let $bGetTIP = $('<div>', { | ||
"class": "bibleGetQuote", | "class": "bibleGetQuote hidden", | ||
"data-version": version, | "data-version": version, | ||
"data-ref": ref, | "data-ref": ref, | ||
Line 61: | Line 61: | ||
$span.on('mouseenter', function(){ | $span.on('mouseenter', function(){ | ||
$bGetTIP. | $bGetTIP.removeClass('hidden'); | ||
let top = $span.offset().top; | let top = $span.offset().top; | ||
let left = $span.offset().left + $span.outerWidth() + 15; | let left = $span.offset().left + $span.outerWidth() + 15; | ||
Line 76: | Line 76: | ||
$span.on('mouseleave', function(){ | $span.on('mouseleave', function(){ | ||
setTimeout(function(){ $bGetTIP. | setTimeout(function(){ $bGetTIP.addClass('hidden'); },500); | ||
}); | }); | ||
} | } |