Today now in this post i will share with you How to check image loaded or not in JQuery? Sometimes on our project we need to detect upload image 100% load successfully, for this example if you want to do print any text instead of image before load image. So we can do this by using jquery load and error method. We can see in the bellow example:
Example:
<script type="text/javascript">
$('.image')
.load(function(){
console.log("Now loaded correctly");
})
.error(function(){
console.log("Found Error in loading image");
});
</script>
Read Also : How to convert Object into Array in PHP?
Thanks for read. I hope it help you. For more you can follow us on facebook.