title: how to get previous value of textbox in jquery on change event
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> $(".whitebox").on('change', function () {
         var previousAmt = $(this).data("old"); //  i want previous value
          var id = this.id;
          var slpitid = id.split("_");
  
          var checkboxid = "#chck_" + slpitid[0];
          if ($(checkboxid).is(':checked')) {
              var tipFlag = true;
          }
          else {
              var tipFlag = false;
          }
  
          if (tipFlag === true)
          {
              $("#amounttipchange").modal('show');
          }
          //alert(previousAmount);
      });</code></pre>
  </div>
  </div>
  </p>
  
  <p>i want to store previous value on change event how can i perform in jquery  i am not able to store value using $(this).data("old"); any help will be appreciated </p>