javascript - How to directly fade to another image (without any delay) using jquery? -


My code works, but this second image can not be directly done: - Fade the first image - & gt; Delay - & gt; How can I fade in the second image fade in the second one?

My jquery code

  $ (document) .ready (function () {var std = $ (".fadeim"). Attr ("src"); var Hover = std.replace (".png", "-hover.png"); $ (".fadeim") .mouseover (function () {$ (this) .FadeOut ("fast", function () {$ ( FadeOut ("fast") ("source", "yes"); $ (this) .fadeine ("sharp");});}). Mouseout (function () {$ (this) .FadeOut ("fast" , Function () {$ (This) .attr ("src", std); $ (this). FadeIn ("fast");})}}}})}};    

When you hover the 'first' image, the second one is still loaded Does not happen. Try this type of:

  $ ('.fadeim'). Every (function () {var std = $ (this) .attr ("src"); Var hover = std.replace (".png", "-hover.png"); $ (this) .clone (). InsertAfter (this) .attr ('src', hover) .removeClass ('fadeim') .Sibings (.) CSS ({zIndex: '1', position: 'full'}); $ (this) .mousecaster (function () {$ (This). Stop (). Feedto (600, 0);}) .moveleave (function () {$ (this) .stop (). Feedto (600, 1);});});   



Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -