Reputation: 27011
JQuery has an event called resize using which you can add an event handler when the window is resized e.g.
$(window).resize(function () {
// code here
});
What I'd need is to resize the window using a JQuery command; would that be possible?
e.g. $(window).resize(-1, -1); // to decrease/increase the width and height of the window
Thanks
Upvotes: 10
Views: 45320
Reputation: 11936
sorry looks like that binds an event handler to the "resize" JavaScript event, or trigger that event on an element.
see: http://api.jquery.com/resize/
Upvotes: -3
Reputation: 69905
Try to use this, its a pure javascript no JQuery involved.
window.resizeTo(width, height);
Upvotes: 27