Move jQuery to the end of body tag?

前端 未结 7 725
星月不相逢
星月不相逢 2020-12-05 16:06

My friend read an article which mentioned that moving all JavaScript files to the end of the closing body tag (), will improve the performance of a

7条回答
  •  忘掉有多难
    2020-12-05 16:30

    Use a "Dom Ready Queue" to collect functions to be executed once jQuery is loaded and the DOM is ready.

    Example:

    
      
        
      
      
      ...
      
    ...

提交回复
热议问题