Problem:
How can I apply different CSS (as example coulours) on different Text in my Content, conditionally?
Solution:
The easiest is to apply HTML Conditional to your HTML classes.
If you have any Class in your HTML (maybe on the table, or a
div class=""
) you can call dynamically
classA
or
classB
with HTML conditional.
As an example, red if radio A is selected and blue if B is selected:
[wpv-conditional if="( $(wpcf-radio) eq 'A' )"] <div class="red"> [/wpv-conditional] [wpv-conditional if="( $(wpcf-radio) eq 'B' )"] <div class="blue"> [/wpv-conditional] content here </div>
And then the CSS in the CSS Editor:
div.red { background-color: red; } div.blue { background-color: blue; }
Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 4 réponses, has 2 voix.
Last updated by julieP Il y a 7 années et 7 mois.
Assisted by: Beda.