jquery cannot get the size solution for a picture under Google Chrome:
This section describes the use of jquery under Google Browser can not get the image size, and in IE and Firefox browser can be normal, of course, not at any time can not get the image size, the following to explain how to solve the problem.
The code is as follows:
$ (document). Ready (function () {var img_h= $img. Height (); var img_w= $img. Width (); })
The above code in IE and Firefox is not a problem, but there may be problems in Google, the reason for the size of the goods is not loaded because the picture is not finished.
Here's how to modify it:
$ (document). Ready (function () {$img. Load (function () {var img_h= $img. Height (); var img_w= $img. Width (); })})
The original address is: the Google browser under jquery can not get a picture of the size of the solution chapter.
The Web site is: jquery tutorial.
jquery cannot get a size solution for a picture under Google Chrome