jQuery UI Widgets Forums General Discussions Change theme at dynamically

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 11 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Change theme at dynamically #31519

    dev_pepper
    Participant

    Hi,

    In my apllication i have some web pages.
    I am using var theme = getDemoTheme(); statement to set my jqwidgets theme in all my web pages.
    It works fine for me.

    Now i need to implement mutiple themes for my application.

    When the time of login,there will be drop down for listing all themes.
    If I choose a particular theme,Then I need to set that theme for my all web pages(same as jqwidget’s demo theme changing).
    Can you please tell me How can i do that?.

    Thanks,

    Change theme at dynamically #31593

    Dimitar
    Participant

    Hello dev_pepper,

    The getDemoTheme() function is intended for use in the online demos only. We suggest that you have a global theme variable, which you set at startup (login). Then, either initialize every widget with the theme property set to theme or just change all widgets’ theme properties to theme, e.g.:

    $("#jqxGrid").jqxGrid({ theme: theme });
    $("#jqxDropDownList").jqxDropDownList({ theme: theme });
    $("#jqxButton").jqxButton({ theme: theme });

    where theme = “orange” for example. Or even:

    var themeSetting= { theme: "orange" };
    $("#jqxGrid").jqxGrid(themeSetting);
    $("#jqxDropDownList").jqxDropDownList(themeSetting);
    $("#jqxButton").jqxButton(themeSetting);

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.