KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to dynamically load a CSS stylesheet into a page that's on a different domain. How can I get the complete URL of the JS file to use in the href attribute of the stylesheet? For instance, here is the structure: http://bla.com/js/script.js http://bla.com/css/style.css I want to dynamically load the stylesheet into a page http://boo.net/index.html . The problem is, I don't know the bla.com bit in advance, just the fact that the stylesheet is in ../css/ relative to the JS file. The script is, of course, included on index.html . jQuery's fine too.
Tags (comma-separated)
Save Edits
Cancel