I am currently working on a customer application which is oneuiv2.1 themed and I wanted to create a simple jQuery Mobile site. the dojo css was really messing up the styling and just for interest I wanted to see if I could programmatically remove the dojo css from the page client side
Using a jQuery selector I can get a handle on that <LINK> as follows
$('link[href*="dojo.css"]') //select all LINK objects where the href contains dojo.css
Once I have that I can just remove the element from the DOM like this
Unfortunately I cannot show you what this does my customer’s site to make it look all pretty and jQueryMobile like, but I can show you how it blows up a oneui site and you can take it from me this fixed my problem.
Just add the above code in a *SCRIPT* tag within your XPage and it will remove the dojo style before it is rendered to the end user – thus they will never know.
Yeah I realize this means the CSS file(s) are downloaded and then removed and I am sure there are more elegant ways to handle the issue server-side.
This was an exercise in learning that jQuery can be used to remove entire CSS DOM objects 🙂