jQuery.one() and jQuery.on()
<p>I have multiple images on my page. To detect broken images , I used this found on SO.</p>

<pre><code>$('.imgRot').one('error',function(){
    $(this).attr('src','broken.png');
});
</code></pre>

<p>This works fine on the first image , which I understand. But when I change this to</p>

<pre><code>$('.imgRot').on('error',function(){
    $(this).attr('src','broken.png');
});
</code></pre>

<p>it does not work on any of the images . Could someone tell me why ?</p>
