How to replace missing images?

49 views Asked by At

I want to replace missing images
Tried this code inside and outsite of document.ready function
Also tried to place it inside head of page - without success
Simply - missing images are not replaced

$('.item').on('error', function(){
    $(this).attr('src', 'ph/vposter.jpg');
});
0

There are 0 answers