Home › Forums › Quform WordPress › add classes
- This topic has 21 replies, 2 voices, and was last updated 4 years, 9 months ago by
artsolving.
- AuthorPosts
- May 15, 2020 at 3:59 pm #31197
artsolving
Participanthi 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 themetnx
May 16, 2020 at 11:22 am #31205Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 16, 2020 at 12:45 pm #31209artsolving
Participantsorry,
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…May 18, 2020 at 11:27 am #31219Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 18, 2020 at 7:01 pm #31221artsolving
Participanthi,
you take wrong field as in image.sorry but even other problems happens. I minified the form for your comprension
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.May 19, 2020 at 10:50 am #31225Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 22, 2020 at 2:37 pm #31254artsolving
Participanthi,
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
- AuthorPosts
- You must be logged in to reply to this topic.