title: Compare Models before and after submission
body: <p>I am having view which accepts Model</p>
  
  <pre><code>@model MyModel
  </code></pre>
  
  <p>Now what I want to do is serialize this model using Jquery and store  it in one global variable.</p>
  
  <p>Now at the time of Submission of form I want to again serialize this model. This models value might have changed . I want this latest serialized model to be compared with old model which was stored in variable. Is there any way to compare these models in single line and depending on that submit form.</p>
  
  <p>Code</p>
  
  <pre><code>$(document).ready(function(){
  var oldModel=$('form').serialize();
  
  $('form').submit(function(){
     var newModel=$('form').serialize();
      if(oldModel==newModel)//How can i achieve this?
       e.preventDefault();
  });
  })
  </code></pre>