summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authormatthew.gregg <matthew.gregg@gmail.com>2008-06-25 08:58:47 -0400
committermatthew.gregg <matthew.gregg@gmail.com>2008-06-25 08:58:47 -0400
commitc0ac127a68ad5dbdeb2da1ec4ba4a15f353adb6a (patch)
tree91661a36d8b2e6207bf3b1904ddd55e9b9eb0e75 /js
parent240989994dae2fffc2e06fb8a88356b4c8ebe4a0 (diff)
Removed some DOM lookups in the char counter
darcs-hash:20080625125847-982e4-b4c1c644fe07a43c61062ae3d9302148ab925088.gz
Diffstat (limited to 'js')
-rw-r--r--js/util.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/util.js b/js/util.js
index 59a489170..7eae496fd 100644
--- a/js/util.js
+++ b/js/util.js
@@ -4,12 +4,13 @@ $(document).ready(function(){
var maxLength = 140;
var currentLength = $("#status_textarea").val().length;
var remaining = 140 - currentLength;
- $("#counter").text(remaining);
+ var counter = $("#counter");
+ counter.text(remaining);
if(remaining <= 0) {
- $("#counter").attr("class", "toomuch");
+ counter.attr("class", "toomuch");
} else {
- $("#counter").attr("class", "");
+ counter.attr("class", "");
}
}