title: Migrating jQuery from 1.12.3 to latest 3.5.1
body: <p>I am in the process of upgrading jQuery from 1.12.3 to 3.5.1(latest version).
  My application is large and we have jQuery version 1.12.3.
  While upgrading with help of jQuery migration script, have faced few technical challenges:</p>
  <ol>
  <li>Can't upgrade directly from version 1.x.x to 3.x.x (obviously we can't do that clearly they mentioned in jQuery guide. Because most of the api are deprecated in 1.x.x versions).</li>
  <li>For testing purposes first, I tried a 3.5.1 jQuery with 3.3.0 migration script. Its generating more blocker issues since my application is using by most of the clients with jQuery version(1.12.3).
  So I have planned to move step by step migration first to 2.2.4 jQuery with 1.4.1 migration. In my application we are using a lot of die() and live() events for a single module,hence I have planned to make our own migration script for die() and live() events.
  Here is the code for live(), which converts to on().</li>
  </ol>
  <pre><code>jQuery.fn.live = function( types, data, fn ) {
      
      try{
        if(typeof(this.selector) == &quot;undefined&quot; &amp;&amp; typeof(this[0].id) != &quot;undefined&quot;){
          this.selector = String(&quot;#&quot; + this[0].id);
        }
      }catch(e){
          }   
      if(typeof(this.context) == &quot;undefined&quot;){
          this.context = jQuery(this).parent();
      }
      else{
          this.context = &quot;body&quot;;
      }
      jQuery( this.context ).on( types, this.selector, data, fn );
      return this;
  };
  </code></pre>
  <p>It's working well. when using the same technique for Die() it is not working. because for example</p>
  <pre><code>$(&quot;.selector&quot;).die().live(&quot;click&quot;,function(){}).
  </code></pre>
  <p>We can't get events and selector for the die function. So I dropped this option.
  Is there's any other way to upgrade jQuery with minimal code changes?</p>
  <p>or</p>
  <p>If I change the on() and off() method manually, How can I ensure the events are working properly instead of manual testing. Since manual code replacement and testing will impact out web app development road map timeline.</p>