jQuery multiple themes on one page

Posted by lloydphillips on Stack Overflow See other posts from Stack Overflow or by lloydphillips
Published on 2010-06-01T00:43:35Z Indexed on 2010/06/01 0:53 UTC
Read the original article Hit count: 325

Filed under:
|
|
|

This is driving me NUTS! I've followed the post here which just doesn't seem to be working: http://www.filamentgroup.com/lab/using_multiple_jquery_ui_themes_on_a_single_page/

I have a base theme, for examples sake it's the Smoothness theme from the jQuery UI gallery. Then I have a 'red' theme which basically colours the buttons red. Here is the theme I created.

So I go to download my theme. Choose Advanced settings, set the scope to 'red' and my theme folder name to 'red' and download. First of all I'm not entirely 100% sure which folder I'm to copy over to my project is it the 'development-bundle\themes' folder (which contains my red folder) or the '\css\red' folder?

I've tried both. The post above seems to suggest if I copy my themes folder and link to my theme in the css it'll work when I add a class of 'red' to a wrapper div or element. So I've linked the themes like so in my file:

<link type="text/css" href="themes/base/jquery.ui.all.css" rel="stylesheet" />
<link type="text/css" href="themes/red/jquery.ui.all.css" rel="stylesheet" />

The base theme loads and works all honkey doorey but the red theme doesn't. I've got a button styled like so:

<input type="submit" id="btn" value="A submit button" class="red" />

I've also tried:

<div class="red">
    <input type="submit" id="btn" value="A submit button" />
</div>

Neither work. When I remove the 'themes/base/jquery.ui.all.css' css file link the button's aren't styled at all. Crazy! I'm pulling my hair out. Where am I going wrong? Surely they should just make it easy enough to download JUST the theme folder and reference the ui.all file.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui