title: Javascript function works in console but not in code
body: <p>I'm trying to install a jQuery plugin for input masking. I've included the js file fine, and I try to initialize it per the docs:</p>
  
  <pre><code>&lt;script src="autoNumeric.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    $(document).ready(function(){
      $('#balance-input').keyup(function(){
          $('.stripe-button').attr('data-amount', $('#balance-input').val());
      });
      $('#balance-input').autoNumeric('init');
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>The first keyup function works fine and is unrelated to the second function. In the console, I get an error that autoNumeric is undefined. Then I enter $('#balance-input').autoNumeric('init'); into the console and it works without a problem. It's inside document.ready and the plugin is included prior to the document.ready. What to do?</p>