Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Java by (9.5k points)

I know I can use JQuery to listen for  resize events. Can anyone tell me how to hook into a browser window resize event?

1 Answer

0 votes
by (19.7k points)

You can attach to the resize event like below:

window.addEventListener('resize', function(event) {

    ...

}, true);

Use JQuery to just wrap standard resize DOM event as below:

window.onresize = function(event) {

    ...

};

Interested in Java? Check out this Java tutorial by Intellipaat.  

Related questions

0 votes
1 answer
asked Feb 26, 2021 in Web Technology by Jake (7k points)
0 votes
1 answer
0 votes
1 answer
asked Feb 10, 2020 in Azure by tusharsharma (4k points)
0 votes
1 answer
asked May 9, 2021 in Java by sheela_singh (9.5k points)

Browse Categories

...