• Resolved Graicifyd

    (@graicifyd)


    Hello,

    I am trying to create a slider whose color changes based on the number that is inputted. So something like:

    if the slider is between 1 and 10, class=”a”
    if the slider is between 11 and 20, class=”b”
    and so on.

    I want to be able to define various CSS classes at different points.

    So I added a css layout keyword, ‘test’ to the slider.

    Then I added this code to a calculated field

    (function(){
    if(fieldname13<=10) test.className = "a";
    if(fieldname13>10) test.className = "b";
    })()

    but I guess it’s supposed to be a script in an HTML field?

    Please kindly advise me on how I can achieve this.

    Thank you for your support.

    • This topic was modified 5 years, 5 months ago by Graicifyd.
    • This topic was modified 5 years, 5 months ago by Graicifyd.
    • This topic was modified 5 years, 5 months ago by Graicifyd.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘VARIABLE CSS CLASS FOR SLIDER’ is closed to new replies.