Error: function is not defined
<p>I have created a <code>js</code> file which has a function.<br>
When I call that function on <code>$(document).ready;</code> it is not working.  </p>

<p>I checked through firebug, It is calling the function but not going into the function.</p>

<p>Here is my JavaScript code:</p>

<pre><code>function toggelEventButtons() {
    var invoiceVal = $('#Invoice_Id').val(); //It is a textbox Id of aspx Page.

    alert(invoiceVal);

    if (invoiceVal &gt; 0) {
        $('#addEventInvoiceDetail').hide();
        $('#editEventInvoiceDetail').show();
    } else {
        $('#addEventInvoiceDetail').show();
        $('#editEventInvoiceDetail').hide();
    }
}
</code></pre>

<p>I call the function from an <code>aspx</code> page like this:</p>

<pre><code>$(document).ready(toggelEventButtons);
</code></pre>
