That might sound like a stupid one but I can't find anything relevant : how to maximize the window on document ready
with jquery ? Or any other generic solution that will work fine on all browsers...
Thanks guys ;)
That might sound like a stupid one but I can't find anything relevant : how to maximize the window on document ready
with jquery ? Or any other generic solution that will work fine on all browsers...
Thanks guys ;)
Share Improve this question edited Jan 11, 2018 at 11:47 Liam 29.8k28 gold badges138 silver badges202 bronze badges asked Dec 5, 2011 at 20:14 BuZzBuZz 17.5k34 gold badges92 silver badges147 bronze badges 6- 7 No. Just no. You don't get to resize my windows, I'm in charge of that, thank you very much. Have you any idea just how annoying this 'feature' would be? – David Thomas Commented Dec 5, 2011 at 20:16
- Don't do it at all. It way too annoying. – maiwald Commented Dec 5, 2011 at 20:16
- Do you want to make the browser window full-screen or make the content of your webpage fill the browser window? – Jasper Commented Dec 5, 2011 at 20:17
- 1 Sounds like the 90' all over again... – Didier Ghys Commented Dec 5, 2011 at 20:18
- @DidierG., everything old is new again. Sigh. – David Thomas Commented Dec 5, 2011 at 20:19
4 Answers
Reset to default 8window.moveTo(0, 0);
window.resizeTo(screen.availWidth, screen.availHeight);
This is not possible for main windows, only for dynamic created windows( created with window.open)
according to:
- https://developer.mozilla/en-US/docs/Web/API/Window/resizeTo
- https://developer.mozilla/en-US/docs/Web/API/Window/moveTo
- https://developer.mozilla/en-US/docs/Web/API/Window/moveBy
Quote:
- You can't resize a window or tab that wasn’t created by window.open.
- You can't resize a window or tab when it’s in a window with more than one tab.
The same of for chrome. Haven't checked IE/Safari though.
I found this method. But I can't make it work. Theoretically, it should be possible to change the width and height of the screen, using positive values.
window.resizeBy(xDelta, yDelta);
For more information, visit http://www.w3schools./jsref/met_win_resizeby.asp.
NO
You cannot do this
Control over the user's browser (minimize, maximize) is for the user only.