Jquery Load Event With My Code
Ok i have some jquery javascript which i intend on adding a .load() event to, hopefully someone can assist me. $(function() { $('#nav li a img').each(function() { var origina
Solution 1:
Before you set the src
property of the Image
, attach the callback like so...
image.onload = function() {
// The image has loaded successfully.
}
When the image has loaded and is successful, it will call that function.
If the function is not successful, it will call the function assigned to the onerror
property.
Alternatively, you can use $(image).load(function() { ... })
.
Post a Comment for "Jquery Load Event With My Code"