code OK in Firefox but fails in IE

code OK in Firefox but fails in IE

I have what I thought was a simple piece of code to count characters in a text area.  The code works fine in FF and safari, but not in IE.  Can someone explain if the problem is my code or something else.

$("textarea#content").keyup(function() {
    var len = this.value.length;
    if (len >= 300) {
        this.value = this.value.substring(0, 300);
     }
   $("p#CountDown").html("You have used " + this.value.length + " of 300 characters");
 });