jQuery resize() using browser maximise button

前端 未结 7 1529
礼貌的吻别
礼貌的吻别 2021-02-07 11:29

This is my code that fires whenever the window is resized:

$(window).resize(function()
{   
    setDisplayBoardSize();
});

Fires fine when I re

7条回答
  •  一个人的身影
    2021-02-07 11:45

    This hapened to me also and didnt knew why, till i read your post. Seems like you were right the function is fired before i pressed maximize, so to fix this i used a litle delay.

    $(window).resize(function()
    {   
    setTimeout(function() {
        setDisplayBoardSize();
    }, 100);
    });

提交回复
热议问题