jQuery && Google Chrome -


This script works entirely in all browsers except Google Chrome.

  $ (document) .ready (function () {$ (".banners-anim img"). Each (function () {var hover_width = $ (this). Width (); var hover_height = $ (this) .it (); var unhover_width = (hover_width - 30); $ (this) .with (unhow_width); var unhover_height = $ (this) .hot (); $ (this ) .clostest ("li") height (unholy_heit); off offset = "-" + ((hover_hete - ahwar_height) / 2) + "px"; $ (this) .classst ("span") .css ({' Position ':' absolute ',' left ':' 0 ',' up ':' 25px ',' width ':' 100% '}); $ (this) .more (function () {$ (this). ({Width: hover_width, marginTop: offset}, "fast"), function () {$ (this) .mate ({width: unhover_width, marginTop: 0}, "fast")});});} );  

Chrome does not recognize changed image features.

When changes in width of , height also change Even not in Chrome ..

  $ (this). Wide (ahwar_width); Var unhover_height = $ (this). height ();  

unhover_height returns 0 .

The complete code for this script (html

thanks

Please help correct it.

>

If you are working with images from within the jQuery ready function , Then you should remember that the images can not be loaded yet . The purpose of the jQuery ready function is to create a fire whenever the dome is ready. , Even if the images are still loading. If you do something Use the load event of window when all images are loaded, use

  $ (window) Load (yourFunctionHere);  

Comments