Jquery – How to resize a window using JQuery

jqueryresizewindow

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

Best Solution

Try to use this, its a pure javascript no JQuery involved.

window.resizeTo(width, height);