title: Uncaught TypeError: undefined is not a function error on loading jQuery
body: <p>I'm making a web application where I need to validate fields. The .js is loading but it gives the Uncaught TypeError: undefined is not a function error at line 2 <code>$("#adduser-form").validate({</code>. Please tell me what I'm doing wrong. Following is my validation file code:</p>
  
  <pre><code>$(document).ready(function() {
      $("#adduser-form").validate({
          rules : {
              email : {
                  required : true,
                  email : true,
                  maxlength : 64
              },
              firstname : {
                  required : true,
                  minlength : 3,
                  maxlength : 32
              },
              lastname : {
                  maxlength : 32,
                  minlength : 3,
                  required : true
              },
              password : {
                  maxlength : 32,
                  minlength : 8,
                  required : true
              },
              company : {
                  maxlength : 64,
                  minlength : 3,
                  required : false
              },
              title : {
                  maxlength : 64,
                  minlength : 3,
                  required : false
              }
          },
  
          messages : {
  
              email: { 
                  required: "Email is required.",
                  email: "Please enter a valid Email address."
              }, 
              firstname: { 
                  required:"First Name is required."
              }, 
              lastname: { 
                  required:"Last Name is required."
              },
              password: { 
                  required:"Password is required.",
              }, 
  
          },
          invalidHandler : function(event, validator) {//display error alert on form submit
              $('.alert-error', $('#adduser-form')).show();
          },
  
          highlight : function(element) {// hightlight error inputs
              $(element).closest('.control-group').addClass('error');
              // set error class to the control group
          },
  
          success : function(label) {
              label.closest('.control-group').removeClass('error');
              label.remove();
          },
  
          errorPlacement : function(error, element) {
              error.addClass('help-small no-left-padding').insertAfter(element.closest('.input-icon'));
          },
  
          submitHandler : function(form) {
              form.submit();
          }
      });
  
      $('#adduser-form input').keypress(function(e) {
          if (e.which == 13) {
              if ($('#adduser-form').validate().form()) {
                  $('#adduser-form').submit();
              }
              return false;
          }
      });
  
  }); 
  </code></pre>