The logic is wrong. . . The menubox listening event here depends on the click event of the box. When the box is not clicked, a large section in the middle will not be executed, so no monitoring will be added to the menubox. These two listening events should be at the same level. Just put the monitoring events inside to the same level as the box
First Click
box
的时候,才给menubox
Click event added. This method is not recommended and may risk memory leaks.It’s best to put out all the menu codes, so that the
menubox
event can be triggered at onceThe logic is wrong. . . The menubox listening event here depends on the click event of the box. When the box is not clicked, a large section in the middle will not be executed, so no monitoring will be added to the menubox.
These two listening events should be at the same level. Just put the monitoring events inside to the same level as the box