0

I would like to figure how i would be able to check the screen size upon re sizing the screen. Is the a jquery command that will allow me to do that?

hectorVill
  • 13
  • 4

2 Answers2

0

Check out the JQuery .height() and .width() functions.

The Velcromancer
  • 437
  • 3
  • 10
0

You cannot really find the display resolution from a web page. However, there are CSS Media Queries statement for it, but they are poorly implemented or not implemented at all in most devices and browsers.

You can use something like this to get the width and height of the browser:

  $(window).height(); // New height
  $(window).width(); // New width

To get notified when the browser is resized, use this bind callback:

// This will execute whenever the window is resized
$(window).resize(function() {
    // Do something
});
imbondbaby
  • 6,351
  • 3
  • 21
  • 54