Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
How could I change CSS Style tag dynamically? — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How could I change CSS Style tag dynamically?

Accepted answer
21
Views
2
Comments
edited Nov 10, 2022 5:09PM in Visual Builder 2 comments

Summary:


Content (required):

I tried using the return of a string function containing CSS Style and I tried using it dynamically in the :style tag, but with no success. I also tried to create a variable containing the string "background-color:#FFA722;" and again the Style tag did not receive the content.


This way it didn't work:

<a target="_parent" on-dblclick="[[$listeners.hyperlinkDblclick]]" class="cell-link-a"

  :style="[[$page.functions.billingSteps($variables.billingStepsCodeADP)]]" >

                  <oj-bind-text value="[[$current.data]]"></oj-bind-text>

  </a>

Is there any way to dynamically change the :style tag?


I got it only when I directly change the class:

<a target="_parent" on-dblclick="[[$listeners.hyperlinkDblclick]]"

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!