mercredi 11 juillet 2018

Java: If - typeof state

Can somebody explain me this code please? In particularly i need to understand the "if" condition.

    wpcf7.toggleSubmit = function( form, state ) {
    var $form = $( form );
    var $submit = $( 'input:submit', $form );

    if ( typeof state !== 'undefined' ) {
        $submit.prop( 'disabled', ! state );
        return;
    }

I don't need every detail of the code, but at least i have to understand what comes out of the "if" condition.

I can post more code if needed. Thank you.

Aucun commentaire:

Enregistrer un commentaire