Skip to content

JQuery Mobile Tips #4

August 15, 2011

Another thing I had found in JQuery Mobile is that once a stylesheet is applied into a page, it stays applied throughout the lifetime of the DOM, so for the dialog box or next page, if you want to add a seperate stylesheet to it, you can add it but that would be added to the previous page or the page that loaded the dialog box.
The solution is to write this code which finds the title if the CSS add reference header and it is removed from DOM, any previous stylesheets are reverted back.
Here’s the code:-
$(‘link[title=mystyle]’)[0].disabled=true;
Hope that helps!

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: