Jquery validation not working
Hi all,
The validation doesn't work on my FF 20.0.01 with code below. Nothing happened.
<!DOCTYPE html>
<html>
<head>
<title>Home Page</title>
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery-1.9.1.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
("#form1").validate({
rule: { txt1: { required: true, maxlength: 10} },
message: { txt1: { required: " required", maxlength: "maxlength"} }
});
});
</script>
</head>
<body>
<form id="form1" action="" method="get">
<input type="text" id="txt1" />
<input type="submit" id="sub1" value="submit" />
</form>
</body>
</html>
Why?
TIA
-t