jquery change event when image src changes

后端 未结 4 453
再見小時候
再見小時候 2020-12-05 17:56
$(\'img.product_image\').attr(\'src\').change(function() {
    alert($(\'img.product_image\').attr(\'src\'));
});

Hi ya\'ll

I am trying to

4条回答
  •  甜味超标
    2020-12-05 18:47

    You can use .load event in this case:

    $('img.product_image').on('load', function () {
     alert($('img.product_image').attr('src'));
    });
    

提交回复
热议问题