Unable to solve validation error
<p>in jQuery i tried:</p>

<pre><code>$('#imgAdd').live("click", function() {
    if ($('#txtName').val() == "") {
        $('#lblError').show();
        $('#lblError').text() = "Please enter a  Name";
        $('#txtMenuName').focus();
    }
    return false;
} 
</code></pre>

<p>but i got a error in console.</p>

<blockquote>
  <p>invalid assignment left-hand side<br>
  $('#lblError').text() = "Please enter a Menu Name";</p>
</blockquote>

<p>I also want if text is entered in field automatically <code>lblerror</code> is hide. How do I achieve this?</p>
