check textfield value, if equal to given value then action if not then do nothing
<p>What I want is when the textfield <strong>#ItemAddress</strong> on focus, check another textfield #<strong>CAT_Custom_279176</strong> and if the value of which carried equals "<strong>SG</strong>", then clear the value of textfield #<strong>CAT_Custom_269379</strong> and #<strong>CAT_Custom_248591</strong>; if value is not "SG" then do nothing. The below code is not correct, please help... Many Thanks</p>

<pre><code>  &lt;script type="text/javascript"&gt;// if Singapore
      $(function() {
      $('#ItemAddress').focus(function() {
          if ($('#CAT_Custom_279176').val('SG')) {
              $('#CAT_Custom_269379').val(''); // clear value in state field
              $('#CAT_Custom_248591').val(''); // clear value in city field
          }
      });
      })               
  &lt;/script&gt;
</code></pre>
