Running a function just before $(document).ready() triggers

前端 未结 3 1371
别那么骄傲
别那么骄傲 2021-02-20 03:40

I\'ve attached multiple functions in multiple files to $(document).ready and would like to attach a single function to happen before them as either the first that $(document).re

3条回答
  •  渐次进展
    2021-02-20 04:29

    I just had the exact same problem. I put a tiny script on GitHub that adds a $.beforeReady() function. Funny :)

    https://github.com/aim12340/jQuery-Before-Ready

    Just load the script right after jQuery like in this example:

    
        
            
            
        
        
            
                    
        
    
    

提交回复
热议问题