title: Materialize: cannot read property 'badInput' of undefined
body: <p>I'm using <code>Behat</code> with <code>Zombie.js</code> for end to end tests, using <a href="http://materializecss.com" rel="nofollow noreferrer">materializecss</a> framework. I'm testing a case where a <code>create</code> action fails and the controller redirects back to the form page.</p>
  
  <p>I get the following exception: </p>
  
  <pre><code>And I press "Crear"      # WebContext::pressButton()
    Error while processing event 'click': "TypeError: Cannot read property 'badInput' of undefined
      at .&lt;anonymous&gt; (https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.4/js/materialize.min.js:8:22076)
      at Function.each (https://code.jquery.com/jquery-2.1.1.min.js:2:2880)
      at n.each (https://code.jquery.com/jquery-2.1.1.min.js:2:847)
      at Object.Materialize.updateTextFields (https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.4/js/materialize.min.js:8:21969)
      at HTMLDocument.&lt;anonymous&gt; (https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.4/js/materialize.min.js:8:22558)
      at j (https://code.jquery.com/jquery-2.1.1.min.js:2:26860)
      at Object.fireWith [as resolveWith] (https://code.jquery.com/jquery-2.1.1.min.js:2:27673)
      at Function.ready (https://code.jquery.com/jquery-2.1.1.min.js:2:29467)
      at HTMLDocument.I (https://code.jquery.com/jquery-2.1.1.min.js:2:29658)
      at callListeners (/usr/lib/node_modules/zombie/node_modules/jsdom/lib/jsdom/events/EventTarget.js:170:34)
          in http://localhost/myresource/create" (Behat\Mink\Exception\DriverException)
  </code></pre>
  
  <p>The worst part is that this doesn't happen on the actual browser (maybe it's cause of a redirection?) so I have no idea how to reproduce it.</p>
  
  <p>Any ideas?</p>