is this a bug or am I just rubbish at using jQuery?

is this a bug or am I just rubbish at using jQuery?

I'm trying to use jQuery to change the color scheme of a site and it all seemed to work lovely in FF but failed in IE with the error message "Error: Invalid Argument, Line 4619 character 4 blah blah blah".

I think the line in my code, which called jQuery & led to the failure was this:
  var currentFontSize=$.cookie('fontresizer');
  $('html').css('font-size', currentFontSize + 'px');

I found a fix somewhere on the interweb from 2008! (http://www.n8williams.com/devblog/javascript_and_ajax/jquery-dialog-error-in-ie7-runtime-error-invalid-argument)

The fix was:
            style[ name ] = value;
to:
            try{style[ name ] = value;} catch (error){}

And it seemed to do the trick.
Should this mod be patched into the core code or am I just rubbish at coding my sites?

Martin.