title: ASP.NET MVC 4: cannot modify jQuery Unobtrusive Ajax
body: <p>Using <code>ASP.NET MVC 4</code> and <code>NuGet</code> to manage packages.</p>
  
  <p>After upgrading to <code>jQuery 1.9.1</code> via <code>NuGet</code>, I began getting <code>JavaScript</code> errors regarding the removal of the <code>live()</code> function in <code>jQuery 1.9.x</code>.</p>
  
  <p>I hit F5 to run in debugging mode from VS.NET, go to the login page, and get the following:</p>
  
  <p><img src="https://i.stack.imgur.com/LNT8g.png" alt="Error Microsoft JScript"></p>
  
  <p>Found this StackOverflow answer: <a href="https://stackoverflow.com/a/14512797">https://stackoverflow.com/a/14512797</a> and made the 4 changes to <code>~\Scripts\jquery.unobtrusive-ajax.js</code>.  </p>
  
  <p>My <strong><code>~\Scripts\jquery.unobtrusive-ajax.js</code></strong>: </p>
  
  <pre><code>    $(document).on("click", "a[data-ajax=true]", function (evt) {
         ...
      });
      $(document).on("click", "form[data-ajax=true] input[type=image]", function (evt) {
         ...
      });
      $(document).on("click", "form[data-ajax=true] :submit", function (evt) {
         ...
      });
      $(document).on("submit", "form[data-ajax=true]", function (evt) {
         ...
      });
  </code></pre>
  
  <p>I also physically deleted <strong><code>jquery.unobtrusive-ajax.min.js</code></strong> and used <code>WebGrease 1.3.0</code> to regenerate it from my updated <strong><code>~\Scripts\jquery.unobtrusive-ajax.js</code></strong>.</p>
  
  <p>However, for some reason, my changes to not use the <code>.live()</code> function are not sticking.  I tried stopping the IIS Express 8.0 Web Site (localhost:63798) under which VS.NET is running the MVC App.  </p>
  
  <p>Also tried doing a Build->Clean Solution, Build->Rebuild Solution before hitting F5 to run in debug mode again.</p>
  
  <p>If anyone has experienced this before and has any insight, I would be very grateful. Thank you in advance. </p>