Commit 8eaaab5a by Chris Rodriguez

Fixing two more safe template for threshold

parent bfc42fa0
...@@ -6,17 +6,29 @@ import math ...@@ -6,17 +6,29 @@ import math
$(function () { $(function () {
function showTooltip(x, y, contents) { function showTooltip(x, y, contents) {
$('<div id="tooltip">' + contents + '</div>').css( { var $tooltip_div = $('<div id="tooltip"></div>').css({
position: 'absolute', position: 'absolute',
display: 'none', display: 'none',
top: y + 5, top: y + 5,
left: x + 15, left: x + 15,
border: '1px solid #000', border: '1px solid #000',
padding: '4px 6px', padding: '4px 6px',
color: '#fff', color: '#fff',
'background-color': '#333', 'background-color': '#222',
opacity: 0.90 opacity: 0.90
}).appendTo("body").fadeIn(200); });
edx.HtmlUtils.setHtml(
$tooltip_div,
edx.HtmlUtils.HTML(contents)
);
edx.HtmlUtils.append(
$('body'),
edx.HtmlUtils.HTML($tooltip_div)
);
$('#tooltip').fadeIn(200);
} }
/* -------------------------------- Grade detail bars -------------------------------- */ /* -------------------------------- Grade detail bars -------------------------------- */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment