How to attach load event to an element in jquery ?

 Posted by Vivek.Ramapuram on 11/7/2014 | Category: jQuery Interview questions | Views: 898 | Points: 40

in the script type we have to attach load method to an html element, load() method is used for the load function
<script type="text/javascript">

<img id="imgLoad" src="" />
$("#imgLoad").load(function () {
alert("ITFunda.Com Logo loaded");

when the image will be loaded completely then user will be alerted from the above example

Asked In: spotted while learning | Alert Moderator 

Comments or Responses

Login to post response