title: Which jquery reference am i missing
body: <p>I have a razor cshtml view that uses jquery. I get following error during certain user action. </p>
  
  <blockquote>
    <p>Microsoft JScript runtime error: Unable to get value of the property
    'unobtrusiveValidationAttributes': object is null or undefined</p>
  </blockquote>
  
  <p>When error happen, debugger breaks at 
  MVCx.GetEditorByElement(b).unobtrusiveValidationAttributes[c+ this]});
  from following line of code</p>
  
  <pre><code> function(b,i){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=a(f).data("unobtrusiveValidation");c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=MVCx.GetEditorByElement(b).unobtrusiveValidationAttributes[c],h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=MVCx.GetEditorByElement(b).unobtrusiveValidationAttributes[c + this]});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});jQuery.extend(e,{__dummy__:true});!i&amp;&amp;c.attachValidation()}
  </code></pre>
  
  <p>My theory is that error is caused because I may not have referece to certain JQuery file (missing   some  <code>&lt;script src="@Url.Content("~/ApplicationScripts/JQuery/jquery-1.4.4.min.js")" type="text/javascript"&gt;&lt;/script&gt;.</code></p>
  
  <p>Assuming its casued by missing jquery reference, one way of solving it is by adding all jquery references (obviously tedious). I wonder if there is better way of finding which jquery reference is actually needed.</p>
  
  <p><strong>UPDATE</strong>
  This is how my references are setup right now</p>
  
  <pre><code>&lt;script src="@Url.Content("~/ApplicationScripts/JQuery/jquery-1.4.4.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/ApplicationScripts/JQuery/jquery.unobtrusive-ajax.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/ApplicationScripts/JQuery/jquery.validate.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/ApplicationScripts/JQuery/jquery.validate.unobtrusive.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>