From 60e63ff28f247d76fb8503aac402491e924725c6 Mon Sep 17 00:00:00 2001 From: Jishnu Mohan Date: Sun, 18 Nov 2012 14:20:24 +0530 Subject: [PATCH] avoid generation of multiple divs --- static/application.js | 3 +-- static/index.html | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/application.js b/static/application.js index dab2a5e..e018681 100644 --- a/static/application.js +++ b/static/application.js @@ -208,8 +208,7 @@ haste.prototype.addLineNumbers = function(data) { }; haste.prototype.getCharacterWidth = function() { - var $div = $("
"); - $("body").append($div); + var $div = $("#sandbox"); $div.html('a'); $div.css('width','auto') .css('font', $("code").css('font')) diff --git a/static/index.html b/static/index.html index f4f22f7..cb7cc1b 100644 --- a/static/index.html +++ b/static/index.html @@ -63,7 +63,8 @@
- +
+