jquery validate: IF form valid then show submit button

后端 未结 3 2027
离开以前
离开以前 2020-12-17 04:51

I have a basic empty form and would like to only show the submit button once:

  1. Data has been entered into the form.
  2. All required/va
3条回答
  •  旧巷少年郎
    2020-12-17 05:20

    Following on from Alan Buchanan's answer, this might work:

    $('#yourform input,#yourform textarea').bind('oninput', function(){
    
        if ($('#yourform').valid()) $('#submitButton').fadeIn();
    
    });
    

    - Notes and reference.

提交回复
热议问题