load jquery after the page is fully loaded

前端 未结 11 1506
甜味超标
甜味超标 2020-12-31 08:32

I\'m looking for a way to load jquery after the page is fully loaded.
well there are lots of questions and answers about it in here, but all describe how to run a scri

11条回答
  •  感动是毒
    2020-12-31 08:38

    My guess is that you load jQuery in the section of your page. While this is not harmful, it slows down page load. Try using this pattern to speed up initial loading time of the DOM-Tree:

    
    
    
        
        
    
        
        
    
    
    
        
    
        
        
        
    
    
    
    

    Just add your scripts at the end of your tag.

    There are some scripts that need to be in the head due to practical reasons, the most prominent library being Modernizr

提交回复
热议问题