पर लॉगिन फ़ॉर्म को कैसे हिलाएं मेरे पास HTML और CSS के साथ एक लॉगिन पृष्ठ है। यह पूरी तरह कार्यात्मक है और वह सब कुछ है। हालांकि, जब लॉगिन विफल रहता है तो मैं लॉगिन फॉर्म को हिला देना चाहता हूं। मैं इसे कैसे हिला सकता हूँ। अभी, यह कुछ भी नहीं करता है।त्रुटि
यहां मेरा HTML/CSS/जावास्क्रिप्ट है। यदि अधिक कोड की आवश्यकता है, तो कृपया मुझे बताएं।
एचटीएमएल
<div class="input">
<c:if test="${not empty error}">
<div class="error">${error}</div>
</c:if>
<c:if test="${not empty msg}">
<div class="msg">${msg}</div>
</c:if>
<div class="email">
<input type="text" name="username"
placeholder="[email protected]"></input>
</div>
<div class="password">
<input type="password" name="password" placeholder="*********"></input>
</div>
</div>
<input class="login_btn" type="submit" name="submit" value="">
सीएसएस
.container .login_component .login_wrap .login_wp .input input {
width: 290px;
height: 50px;
padding-left: 20px;
font-size: 15px;
border: none;
background: transparent;
}
.container .login_component .login_wrap .login_wp .input .email {
height: 53px;
margin-top: 20px;
background:
url("http://xiilab.mynetgear.com:81/c.hwang/rems/images/login/input.png");
background-repeat: no-repeat;
background-position: center center;
}
.container .login_component .login_wrap .login_wp .input .password {
height: 53px;
margin-top: 20px;
background:
url("http://xiilab.mynetgear.com:81/c.hwang/rems/images/login/input.png");
background-repeat: no-repeat;
background-position: center center;
}
.container .login_component .login_wrap .login_wp .login_btn {
height: 55px;
margin-top: 30px;
background:
url("http://xiilab.mynetgear.com:81/c.hwang/rems/images/login/login_btn.png");
background-repeat: no-repeat;
background-position: center center;
border: none;
width: 310px;
}
जावास्क्रिप्ट
$('input[type=submit]').on('click', function(e){
e.preventDefault();
$('.input').addClass('ahashakeheartache');
});
$('.input').on('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e){
$('.input').delay(200).removeClass('ahashakeheartache');
});
यह आसान लोगों का जवाब देने के लिए हो सकता है पहले कोड का एक बड़ा टुकड़ा करने के लिए खुदाई करने के लिए बिना। यदि * वास्तविक * कोड की वास्तव में आवश्यकता नहीं है, तो यह एक बहुत ही सरल उदाहरण देना या कोड को पूरी तरह से छोड़ना बेहतर हो सकता है। :) – JakeTheSnake