EasyUI Forum

General Category => General Discussion => Topic started by: catpaw on July 07, 2014, 05:57:33 PM



Title: multiple themes
Post by: catpaw on July 07, 2014, 05:57:33 PM
hi, I've searched for "themes" but nothing came out.

my question is:

is posible to use at same time two or even more themes?

thanks


Title: Re: multiple themes
Post by: jarry on July 08, 2014, 12:14:19 AM
You have to use only one theme in a page. But you can change theme dynamically for the page at runtime.


Title: Re: multiple themes
Post by: Pierre on July 08, 2014, 01:06:46 AM
Jarry
do you have some simple demo of how to do that?
Thanks.


Title: Re: multiple themes
Post by: jarry on July 08, 2014, 01:28:54 AM
Your default theme may be:
Code:
<link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css">

To change the theme, just change the <link>'s 'href' attribute with a simple call.
Code:
var link = $('#content').find('link:first');  // find the link
link.attr('href', '/easyui/themes/gray/easyui.css');


Title: Re: multiple themes
Post by: Pierre on July 09, 2014, 11:49:34 AM
Thank you!