javascript - JS/Jquery syntax for IE Window width and height -


I am measuring the window and document width and height through the following properties:

  // Dynamically measure the height and width of the window and document w = $ (window) Width (); Var h = $ (window) height (); Var wd = $ (document) With (); Var hd = $ (document). height ();  

Works fine in Firefox but IE kicks a nuisance. Is there any alternative to this syntax that works in IE?
JS error received - Could not get property of status. Invalid logic

I just found out what the "bug" is in the code. Firefox is able to get width and height, although you put your javascript but IE is only able to achieve this values ​​when the script is within the body element. I had the same problem here and was trying about an hour. I noticed that the JSWin script is inside the page and my javascript has been moved to the body and wow - it works in IE: -)

Best regards

< / Html>

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -