$document not defined

$document not defined

Hi All,

I am getting $document.ready(function() not defined in the firebug console.

I have seen that in most cases this is caused when the jQuery core is missing or the path is invalid. I do not believe this is the problem in my case becuase firebug shows the code as being loaded successfully and it is readable.

I have the following scripts in my head;

  1. <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
  2.         <script type="text/javascript" src="jquery.validate.js"></script>
  3.         <script type="text/javascript">
  4.             jQuery.validator.addMethod(
  5.             "selectNone",
  6.             function(value, element)
  7.             {
  8.                 if (element.value == "none")
  9.                 {
  10.                     return false;
  11.                 }
  12.             },
  13.             "Please select an option."
  14.             );
  15.            
  16.             ( function($) {
  17.             $document.ready(function()
  18.             {
  19.                 $("form#form").validate(
  20.                 {
  21.                     rules: {
  22.                         date:
  23.                         {
  24.                             required: true,
  25.                             date: true
  26.                         },
  27.                         run1:
  28.                         {
  29.                             required: true,
  30.                             selectNone: true
  31.                         },
  32.                         chipuse:
  33.                         {
  34.                             required: true,
  35.                             selectNone: true
  36.                         },
  37.                         chiprec:
  38.                         {
  39.                             required: true,
  40.                             selectNone: true
  41.                         }
  42.                     },
  43.                 });
  44.             });
  45.             })(jQuery);
  46.         </script>
The function($) was something suggested here to help resolve this issue but it does not help.

Any suggestions are appreciated.

Bala.