title: jQuery.Deferred exception: $(...).error is not a function, TypeError $(...).error is not a function
body: <p>I've searched alot to find the answer, but on every page or every question the problem is either the Person didnt include the jQuery files proberly or they were naming something wrong. 
  I tried to use different jQuery CDNs, but obviously the same error came. 
  I even deleted my whole script to look if there is a conflict with the code. 
  Strange thing is, only the .error() handler gets this error. Every other handler works fine.
  If i call .error() on an other element, it spits out the same error.</p>
  
  <p>HTML:</p>
  
  <p><code>&lt;img class="prev_img" src="img/no_image.png" alt="Vorschau Bild" width="250px" height="160px"&gt;</code></p>
  
  <p>JS</p>
  
  <pre><code>&lt;script
    src="https://code.jquery.com/jquery-3.4.1.min.js"
    integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
    crossorigin="anonymous"&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt; 
      $(document).ready(function(){
          $("img").error(function(){
              console.log("Error");
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I really don't know what the Problem could be. I restarted my XAMPP multiple times in Hope its messing something up with the file inclution. But it seems that everything works fine.</p>
  
  <p>I'm glad if i could get some help.</p>
  
  <p>Greetings</p>
  
  <p>EDIT: </p>
  
  <p>I've tried using </p>
  
  <pre><code>$(document).ready(function(){
          $("img").on("error", function(){
              console.log("Error");
          });
      });
  </code></pre>
  
  <p>but even though in the console i get a    <code>GET</code>    404 not found error, the error handler doesnt do anything.</p>