locked
$(window).width() returning incorrect values in Android Firefox RRS feed

  • Question

  • User-1498334129 posted

    We have to script a page in Android Firefox. I am using $(window).width() and $(window).height() to get the viewport width and height. It is returning a value of 360 * 640. The actual display resolution is 540 * 960. Any pointers to why I am getting incorrect values for window size in Android Firefox?

    Saturday, September 15, 2012 1:22 PM

Answers

  • User1943143334 posted

    Hi,

    Did you tried - 

    $(document).width()

    Moreover, you can also try the following - 

    document.body.clientWidth

    Hope it helps u...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 16, 2012 5:19 AM