automatically detect web browser window width change?

前端 未结 8 1620
清酒与你
清酒与你 2021-02-01 16:20

i know that you with $(window).width() can get the size of the web browser.

i want to detect when the user change the size of his web browser so i could readjust the col

8条回答
  •  暖寄归人
    2021-02-01 16:57

    The JavaScript event is named window.onresize.

    The JQuery binding is named .resize()

提交回复
热议问题