Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: How to change css of htmlObject in javascript

  1. #1

    Default How to change css of htmlObject in javascript

    Hi,

    I have a dashboard, where I need to change css style of htmlObject dynamically. Is there any method for this.htmlObject?

    Could I kindly ask you for help? I tried to find any API documentation, however I was not successful.

    Thank you
    Magdalena

  2. #2
    Join Date
    Dec 2010
    Posts
    304

    Default

    Hi Magdalena,
    try with

    function f() {
    $("#" + this.htmlObject).css("property1", "value")
    .css("property2", "value")
    .css("property3", "value")
    // ...
    .css("propertyN", "value");
    }

    inside a component property as postExecution.

    Example:
    Code:
    function f() {
    $("#" + this.htmlObject).css("width", "300px")
    .css("height", "150px")
    .css("border", "2px solid #000")
    .css("background-color", "gray");
    }

  3. #3

    Default

    Hi lukolap,

    as always, thank you very much, it works perfectly.

    Is there any API documentation, so I can try other methods by myself?

    Thank you
    Magdalena

  4. #4
    Join Date
    Dec 2010
    Posts
    304

    Default

    Quote Originally Posted by minimalne4 View Post
    Hi lukolap,

    as always, thank you very much, it works perfectly.

    Is there any API documentation, so I can try other methods by myself?

    Thank you
    Magdalena
    Official jQuery documentation: http://api.jquery.com/
    A cheat sheet I like: http://oscarotero.com/jquery/

    Have fun with jQuery!

  5. #5

    Default

    Thank you. I am lost now, but I will try to understand

    Best regards
    Magdalena

Tags for this Thread

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.