noob question...
Had the same kind of question yesterday. Managed to get it working without an answer. Today, same script, different divs -not working.
Html of it
<div class="imgform">
<form>
Login:
<input type="text" id="imglogin" name="login">
Password:
<input type="password" id="imgpass" name="pass">
<a class="imglogin" href="#">Login</a>
</form>
</div>
And the script it self
$(".imglogin").click(function(){
var password = "111";
if($("#imgpass").val() !== password) {
$("#imgform").text("Incorrect password");
} else {
window.location.href = "http://google.com";
} });
Went over the script a few times. Can't figure out where is my mistake