javascript - How do I call a method when an image has been fully loaded and rendered? -
i need phone call method after image has been loaded , rendered in browser.
quick illustration big image:
http://jsfiddle.net/2clm4epv/
<img width="500px" src="http://www.digivill.net/~binary/wall-covering/(huge!)14850x8000%2520earth.jpg">
my method should called when image visible.
as discussed in comments utilize .load()
function along phone call accomplish task,
html
<img id="bigimage" width="500px" src="http://www.digivill.net/~binary/wall-covering/(huge!)14850x8000%2520earth.jpg"/>
js
$('#bigimage').load(function(){ alert('loaded , redered'); });
demo javascript jquery html css
No comments:
Post a Comment