jqueryが新しく、入力フォームが4つあります。送信ボタンでは、必須フィールドをチェックする必要があります。 必須のフィールドを確認した後、別のdivが表示されます。私は、htmlの& jqueryコードを貼り付けています。 Pls hekp私はこれを解決する。事前に他のdivを表示した後に投稿をクリックしたときにチェック入力が空でない
おかげ
<form class="login-form">
<div class="form-group">
<label>Email</label>
<input type="email" class="form-control" required="required">
</div>
<div class="form-group">
<label>Mobile Number</label>
<input type="text" class="form-control" required="required">
</div>
<div class="form-group">
<label>Password</label>
<input type="password" class="form-control" required="required">
</div>
<div class="form-group">
<label>Confirm Password</label>
<input type="password" class="form-control" required="required">
</div>
<div class="forgot-password-text highlight-text bl">
Already have an account? Back to Login
</div>
<button class="btn btn-primary form-control createac" type="submit" id="signupbtn">Sign Up</button>
</form>
私のjqueryの
$('#signupbtn').click(function() {
if ($('.signupform').find(':input').length > 0) {
return;
}
$('.login-translate-container').css("transform", "translateX(-720px)");
})
しかし、私はjQuery検証プラグインを使いたくない – Vishaal