weepy,
can you try this instead (this code only for IE);
if($.browser.msie && document.namespaces["v"] == null) {
document.namespaces.add("v", "urn:schemas-microsoft-com:vml");
var ss = document.createStyleSheet().owningElement;
ss.styleSheet.cssText = "v\\:*{behavior:url(#default#VML);}"
}
you say it gives error on the first line, but I believe adding a
namespace cannot be the problem, so this is only in case
the error is produced by attaching the style in that way.
I tested the above way of adding a stylesheet in the past,
I didn't try with your specific example, anyway let me know
if this solves your problem.
Diego Perini
On 30 Apr, 13:59, weepy <jonah...@gmail.com> wrote:
> Hi
> I am trying to automatically add in namespaces into IE for my cornerz
> plugin
> (http://parkerfox.parkerfox.railsplayground.net/cornerz/)
> However I am finding that it fails on the first line of the following
> code in IE (6)
> if($.browser.msie && document.namespaces["v"] == null) {
> document.namespaces.add("v", "urn:schemas-microsoft-com:vml");
> var ss = document.createStyleSheet();
> ss.cssText = "v\\:*{behavior:url(#default#VML);}"
> }
> I am using jQuery 1.2.3.
> Any ideas ?
> Jonah