Jquery taking effect after the page is loaded

前端 未结 4 423
轻奢々
轻奢々 2021-01-24 03:00

I am using jquery ui. But the page is taking a lot of time to load. Also I am using tabs function for on LI elements of UL tag. But for a split second the list is shown as it is

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-24 03:39

    If you are truely using the load event, then you probably want to switch to the domReady event.

    instead of doing

    
    
    
    

    do

    
    
    
    

    or simply

    
    
    
    

    which is a shortcut for the same thing

    This will trigger as soon as the DOM is ready to be manipulated, but before images are loaded, and generally before the browser renders the page for the first time, tho that depends on how your have built your page.

提交回复
热议问题