jquery change event when image src changes

后端 未结 4 455
再見小時候
再見小時候 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:52

    You could make use of load event if you like

    $("img.product_image").load(function(){
         alert("New image loaded");
    });
    

    Jsfiddle here

提交回复
热议问题