• Resolved rui9075918

    (@rui9075918)


    Good morning,

    Is it possible to add a similar function to an “OnClick event” button?

    Or what needs to be done to make it work?

    (function(){
        var css = {};
    	
        if(fieldname24 > 1) {
            
            css['width'] = (fieldname24 * 4) + 'px';
        } else {
            
            css['width'] = '400px';
        }
        jQuery('#fbuilder .my-class').each(function(){jQuery(this).css(css);});
    })();
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @rui9075918

    You can implement it from the button onclick event with a piece of code similar to:

    
    var f24 = getField('fieldname24').val();
    jQuery('#fbuilder .my-class').css('width', (f24 > 1 ? f24*4 : 400)+'px');

    Best regards.

    Thread Starter rui9075918

    (@rui9075918)

    Is perfect.

    Thanks 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Button (onClick)’ is closed to new replies.