How do you make an event listener that detects if a boolean variable becomes true?

前端 未结 7 2098
-上瘾入骨i
-上瘾入骨i 2020-12-31 19:52

For example, I have var menu_ready = false;. I have an ajax function that sets menu_ready to true when the ajax stuff is done:

//se         


        
7条回答
  •  太阳男子
    2020-12-31 20:35

    Why do not create a function menuReady that will be fired when you want ?

    menuReady();
    

提交回复
热议问题