title: JQuery TypeError - Callback.call is not a function
body: <p>In the following <code>jquery</code> call on form submit, I'm getting the following error. There are some posts online on the error but for some reason I'm still not clear on what I may be missing in the jquery code below:</p>
  
  <p><strong>Error</strong>:</p>
  
  <pre><code>TypeError: callback.call is not a funtion
  </code></pre>
  
  <p><strong>Notes</strong>: </p>
  
  <ol>
  <li>Although it's a jquery error, I've added the details of the error just to show which jquery version and library I'm using. It's a built-in configuration of jquery when you create an ASP.NET Core MVC project in Visual Studio 2015.</li>
  <li>The inputs display the money values as <code>$15,406.15</code> etc and I am trying to remove the <code>$</code> and <code>,</code> from the inputs before the form is submitted.</li>
  </ol>
  
  <p><strong>Error Details</strong>:</p>
  
  <pre><code>TypeError: callback.call is not a function at Function.each (http://localhost:50507/lib/jquery/dist/jquery.js:365:19) at jQuery.fn.init.each (http://localhost:50507/lib/jquery/dist/jquery.js:137:17) at HTMLFormElement.&lt;anonymous&gt; (http://localhost:50507/ControlleName:203:36) at HTMLFormElement.dispatch (http://localhost:50507/lib/jquery/dist/jquery.js:4737:27) at HTMLFormElement.elemData.handle (http://localhost:50507/lib/jquery/dist/jquery.js:4549:28)
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;form id="myform" asp-controller="CustOrders" asp-action="ProductPrices" method="post"&gt;
  ....
  &lt;tr&gt;
   &lt;td&gt;Item1:&lt;/td&gt;
   &lt;td&gt;&lt;input asp-for="item1_price" asp-format="{0:C}" class="inputclass" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
       &lt;td&gt;Item2:&lt;/td&gt;
       &lt;td&gt;&lt;input asp-for="item2_price" asp-format="{0:C}" class="inputclass" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  ...
  &lt;tr&gt;
       &lt;td&gt;Item9:&lt;/td&gt;
       &lt;td&gt;&lt;input asp-for="item9_price" /&gt;&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
       &lt;td&gt;Item1:&lt;/td&gt;
       &lt;td&gt;&lt;input asp-for="item1_price" asp-format="{0:C}" class="inputclass" /&gt;&lt;/td&gt;
  
  &lt;/table&gt;
  &lt;button type="submit" name="submit" value="Add"&gt;Update Report&lt;/button&gt;
  &lt;/form&gt;
  
  @section scripts
  {
      &lt;script&gt;
          $(document).ready(function () {
              $("#myform").submit(function () {
                  $('.inputclass').each($(this).val($(this).val().replace(/[$,]/g, '')));
              });
          });
      &lt;/script&gt;
  }
  </code></pre>