I'm using Jquery in my project. Everything works good on Firefox, but on IE, I get error saying "Invalid argument","Code 0". I found that the line
$(thisObj).css({'border':'1px dotted transparent;'});
is causing problem.
Is there any other way to set the css ?
A开发者_如何学编程lso, in the same project, I'm using styleSheet object. I have completed the functionality and it works on Firefox. Now, While I tested on IE, I needed to change some property names to make it working. What can be the best way to make it working for IE also. Do I need to rewrite the functions for IE ?
Thanks in advance.
i usually use $(thisObj).css('border','1px dotted transparent');
syntax
When using a setting call to .css()
you shouldn't include the trailing semi colon on the value, as you would in a normal bit of CSS.
$(thisObj).css({'border':'1px dotted transparent;'});
|
//remove this semi-colon
$(thisObj).css({'border':'1px dotted transparent'});
I've just quickly tested this on my work IE7 machine here, and adding a semi-colon to any .css()
call of this nature instantly breaks it with the error message you are quoting.
精彩评论