Load external style sheets on request from a different origin

Posted by AshTek on Stack Overflow See other posts from Stack Overflow or by AshTek
Published on 2010-03-15T15:51:44Z Indexed on 2010/03/15 16:09 UTC
Read the original article Hit count: 563

Hi,

Is there a plugin or feature in jQuery that enables the dynamic loading of stylesheets from different origins similar to $.getJSON() or $.getScript()? I am able to dynamically integrate a style sheet from the same origin, but I need to be able to dynamically inject a jQuery UI theme from a different origin into a page. I guess I can load the CSS file as JSON data and then apply the contents using $().css(); however, I was looking for a more elegant solution.

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about stylesheet