diff --git a/jquery.flot.js b/jquery.flot.js index c6a8c8f..72f2ebe 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -286,25 +286,18 @@ Licensed under the MIT license. if (info == null) { - var element = $("
" + text + "
"); + var element = $("
").html(text).css({ + position: "absolute", + top: -9999 + }); if (typeof font === "object") { element.css({ font: textStyle, color: font.color, - position: "absolute", - top: -9999 }); } else if (typeof font === "string") { - element.addClass(font).css({ - position: "absolute", - top: -9999 - }); - } else { - element.css({ - position: "absolute", - top: -9999 - }); + element.addClass(font); } element.appendTo(this.container);