add classes

Home Forums Quform WordPress add classes

This topic is: resolved
Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #31197
    artsolving
    Participant

    hi ally,
    sorry but the problem remain with radio button not only with fonts but also other styles.

    example:

    CSS:

    .normal {
    font-size: 14px;
    color: black;
    }

    .medium {
    font-size: 16px;
    color: black;
    }

    .large {
    font-size: 24px;
    color: black;
    }

    JS:

    jQuery(function ($) {

    $(‘.quform-field-14_6436’).on(‘change’, function () {

    if ($(‘.quform-field-14_6436_1’).is(‘:checked’)) {
    $(‘#dida1col, #dida2col, #dida3col’).addClass(‘normal’);
    } else {
    $(‘#dida1col, #dida2col, #dida3col’).removeClass(‘normal’);
    }

    if ($(‘.quform-field-14_6436_2’).is(‘:checked’)) {
    $(‘#dida1col, #dida2col, #dida3col’).addClass(‘medium’);
    } else {
    $(‘#dida1col, #dida2col, #dida3col’).removeClass(‘medium’);
    }

    if ($(‘.quform-field-14_6436_3’).is(‘:checked’)) {
    $(‘#dida1col, #dida2col, #dida3col’).addClass(‘large’);
    } else {
    $(‘#dida1col, #dida2col, #dida3col’).removeClass(‘large’);
    }

    });

    });

    Inspector says they take classes but on live quform fields don’t works how classes declare.

    maybe a bug on me ?
    working with Quform last version + WP 5.4.1 + Avada theme

    tnx

    #31205
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31209
    artsolving
    Participant

    sorry,
    but I’m very stuck on this.
    I tried adding other option to element and type of classes to all option but the problem is on.
    everything after the second option isn’t considered at all…

    #31219
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31221
    artsolving
    Participant

    hi,
    you take wrong field as in image.

    sorry but even other problems happens. I minified the form for your comprension

    viewroom scegli il layout

    it make sense that what I have on CSS editor is different on inspector ?
    also when digit the name of the class on editor it becomes underscored ? seems like an invalid name…

    sure that I haven’t a bug ?

    Attachments:
    You must be logged in to view attached files.
    #31225
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31254
    artsolving
    Participant

    hi,
    resolved in this way:
    made radio option with 2 choice, give to id element show on div same class of first option setting as default. then give other class on second choice…
    in your opinion is a best practice instead to start with an independent class for the div element and changing it on change the option ?

    tnx

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2019 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy