Load jquery asynchronously before other scripts

后端 未结 5 1574
情书的邮戳
情书的邮戳 2020-12-05 06:33

I\'ve added the async attrib to my javascript inclusion HTML.
So now I\'ve:

         


        
5条回答
  •  鱼传尺愫
    2020-12-05 07:21

    
    
    

    found it i had problems with bootstrap loads sometimes before jquery now np hope it helps others i put this script at head but gave an error cant appendChild now its before /body and checked works for all browsers i tryed script async but it didn't have an event that tell me when the download ends and some times bootstrap loaded before jquery and vise versa because bootstrap depend on jquery i had to load jquery and then start download bootstrap now i'll add fallback

    fixed it

    now it checks that jq loaded

    and only then loads others

    ok now its copy paste

提交回复
热议问题