JQM: External Content CSS interfers with JQM CSS
Hi,
I'm trying to load an external static html page into a JQM app (div, iframe, any will do) the following way (I'm currently using a div):
- // load html from external (though same server) html page
- $.get(externalHtmlFolder '/filename.html', function (data)
- {
- // change the html so that the path to css is correct from the app's location
- data = data.replace('href="stylesheets/style.css"', 'href="' + externalHtmlFolder + '/stylesheets/style.css"');
- // insert the loaded and now altered html into a div on a jqm page
- $('#invoice_html_container')[0].innerHTML = data;
- });
And this appears to work.
Now unfortunately the css file loaded for the external html page "style.css" seems to be messing with JQM's styles in the rest of the app, after the page is loaded.
Is there a way to prevent this or does anyone know of a better way to achieve what I'm trying to do here?
/Aidal