Changes in field input changes color of button

[ad_1]

Hello there,

I try to achieve the change of the background color of the calculation button when any of the fields (dropdown, radio button, number) are changed after a calculation so that the user is aware to press the calculation button again (for an updated result).

I tried the code below as html but it failed to work:

<script>
jQuery(document).on('change', '[id*="fieldname11_"]', function(){
var f = jQuery(this), v = f.val();
this.form.change.cff-button-field input{background: #3CB371 !important;};
f.val(v).change();{
});
</script>

What did I do wrong? I suspect the command ‘this form change’ to change the background color of the calculation button is faulty.

Thanks in advance

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer