Jquery not loading in head but loading on bottom of body tag

后端 未结 5 1008
囚心锁ツ
囚心锁ツ 2020-12-12 07:42

Here is my problem: as title says, jQuery is working only when I put the scripts on the bottom of the body tag. When I put them in head they are not working. I am using just

5条回答
  •  死守一世寂寞
    2020-12-12 08:16

    i dont think your problem is where to load jquery, its how to use it for example put jquery in head and try this :

    $(document).ready(function(){
    alert('document is fully loaded and jquery can access all elements now !');
    })
    

提交回复
热议问题