To get the width and height of the viewport:
var viewportWidth = $(window).width();
var viewportHeight = $(window).height();
resize event of the page:
$(window).resize(function() {
});
More Related Contents:
- HTML5 Canvas 100% Width Height of Viewport?
- Auto resizing the SELECT element according to selected OPTION’s width
- auto resize text (font size) when resizing window?
- Resizable table columns with jQuery [closed]
- Resize event firing multiple times while dragging the resize handle
- How do you resize Fancybox at runtime?
- jquery trigger function when element is in viewport
- jQuery Animation – Smooth Size Transition
- jQuery trigger when 2/3s of div are in viewport
- jquery resize listener on a div
- Animate counter when in viewport
- Custom CSS to allow chrome textarea resize smaller than initial state?
- TypeError: ‘undefined’ is not a function (evaluating ‘$(document)’)
- Use jQuery to change a second select list based on the first select list option
- jQuery Call to WebService returns “No Transport” error
- Custom date format with jQuery validation plugin
- jQuery event handlers always execute in order they were bound – any way around this? [duplicate]
- jQuery – Detect value change on hidden input field
- getting the X/Y coordinates of a mouse click on an image with jQuery [duplicate]
- Get clicked element using jQuery on event?
- Cannot modify content of iframe, what is wrong?
- How to show/hide an element on checkbox checked/unchecked states using jQuery?
- jQuery: Check if image exists
- How do I select elements on multiple attribute values
- How can I disable a button on a jQuery UI dialog?
- Twitter Bootstrap add active class to li
- Animate an element’s width from 0 to 100%, with it and it’s wrapper being only as wide as they need to be, without a pre-set width, in CSS3 or jQuery
- Use jQuery to convert JSON array to HTML bulleted list
- How to get form html() via jQuery including updated value attributes?
- how to fetch array keys with jQuery?