title: Show or Hide field based on user input
body: <p>I have to show checkbox, only if <code>firstname</code> matches <strong>abc</strong> or <code>email</code> is <strong>abc@gmail.com</strong>.</p>
  
  <pre><code>var x = abc; //will come dynamically
  var y = abc @gmail.com
  
  jQuery("#firstname").on('change', (function(avalue) {
      return function(e) {
  
          if (e.targetvalue == avalue) {
              //show checkbox
          } else {
              //hide checkbox
          }
      };
  })(x));
  
  jQuery("#email").on('change', (function(avalue) {
      return function(e) {
  
          if (e.targetvalue == avalue) {
              //show checkbox
          } else {
              //hide checkbox
          }
      };
  })(y));
  </code></pre>
  
  <p>This works good. But, if I enter username <strong>abc</strong> and email <strong>abc@gmail.com</strong>, then I again enter wrong email, the checkbox is hidden, which should not because name is already set <strong>abc</strong> correctly. </p>
  
  <p>How could I achieve this?</p>