jQuery beginner - cannot use jQuery form validation : please help need for assignment
I have downloaded the plugin from
http://bassistance.de/jquery-plugins/jquery-plugin-validation/
i have downloaded jQuery (jquery-1.11.0.min.js) from jquery.com
and i have the 2 js files and the html file in 1 folder.
Here is the code which i am trying:
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<script src="jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#form").validate({
rules: {
name: "required",
}
});
</script>
<style type="text/css">
#form label.error {
color:red;
}
#form input.error {
border:1px solid red;
}
</style>
</head>
<body>
<form id="form" method=" " action=" ">
<label>Name</label>
<input type="text" id="name" name="name" class="true">
<input type="submit" value="submit" />
</form>
</body>
</html>