[jQuery] Re: attr() on crashing IE6

2009-07-20 Thread James
If I remember right, IE6 has issues with creating elements without using createElement() and adding attributes to them afterwards. Using the method that Hector specified to create the element should prevent the issue from occuring in IE6. On Jul 20, 8:59 am, Hector Virgen wrote: > This seems pos

[jQuery] Re: attr() on crashing IE6

2009-07-20 Thread Hector Virgen
This seems possible with vanilla javascript (IE6 does not crash). // Vanilla Javascript -- works in IE6 var link = document.createElement('link'); link.type = 'text/css'; link.href = 'foo.css'; link.rel = 'stylesheet'; link.media = 'screen'; document.getElementsByTagName('head')[0].appendChild(link