Jquery error method not displaying desired result
<pre><code>&lt;img src="one.jpg" height="200" width="200"&gt;            
&lt;img src="three.jpg" height="200" width="200"&gt;&lt;br&gt;      

&lt;a href="mylink.html"&gt;&lt;u&gt; Click Here  &lt;/u&gt;&lt;/a&gt;&lt;br&gt;      

&lt;script src="displayAlert.js"&gt;&lt;/script&gt;             

&lt;style type="text/css" src="externCSS.css"&gt; &lt;/style&gt; 


$(document).ready(function(){
   $("[src]").error(function(){
        alert ("error");
      });
});
</code></pre>

<p>Expected Output - The code should display the alert when the files are not present at the specified path.</p>

<p>The jquery is displaying the alert only when the image files are not present at the specified path. It is not displaying anything for css or script files if they are not present. Where am I going wrong? </p>
