Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Themes through css

  1. #1
    Join Date
    Jun 2011
    Posts
    16

    Default Themes through css

    Hello everybody and thanks for your attention.
    I want to implement themes through css classes. Is it possible for an html object to switch dinamically from one css class to another?
    Example: I have a panel1 with an associated css class named theme1.
    I want the user to select from a combo box another theme, say theme2 and then the panel changes its associated css class from theme1 to theme2. Any ideas will be much appreciated.Thanks.

  2. #2
    Join Date
    Jun 2011
    Posts
    16

  3. #3
    Join Date
    Dec 2010
    Posts
    304

    Default

    Hi,
    with jQuery you can easily manipulate DOM elements, including get and set their CSS properties (see http://api.jquery.com/category/css/).
    I think you need addClass and removeClass methods.

  4. #4
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    One other option would be to conditionally / dynamically load another CSS, overriding the previous values.

    If you go to the add / remove class, remember you don't need to do that for every single element, but just by adding a top-level property directly to the body object and write your css according to it
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  5. #5
    Join Date
    Jun 2011
    Posts
    16

    Default

    Thank you Pedro and Luca for your valuable ideas, I'll try them and I'll be posting feedback, have a great day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.