jquery - image preloading problem (using $("img").load()) -


I use the load function to load the images before the hover effect is applied.

  $ ("Img"). Load (function () {// Image preloading // Some functions and variable settings $ listingItems.hover (function () {// effect}, function () {// back effect}}} / / load  

The problem is that I have the effect that only works when I reload the page when I came to the first page, the images are full but there is no hinge effect.

You can see the source here:

What have I done? Can someone help? What is the function Is there any other easy way to preload images before editing?

load Event does not come from cache in some browsers, but to check .complete property and to make sure that load event handler only fire once A ('load', function () (// current code)). Each (function () {If (this.complete) ) $ (This) .load ();});

Hide these images If they are .complete (either actually are loaded with fast or cache), then this load event handler, if it Already running ( actually fast load case), not sweat, so this is it.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -