javascript file not working when linked from HTML

后端 未结 7 1294
粉色の甜心
粉色の甜心 2021-01-17 23:52

so I feel(and hope) this is pretty simple. I am new to javascript and am trying to get this working. When I link to my external .js file from my html it does not function. H

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 00:02

    You dont have jquery in your section. Add it before you add scripts.js. Only then will your code work.

    
      slidepanel test
      
    
      
      
    
    
    

    If you're testing this in your local machine, add a http to the src or download your own copy of jQuery.

    And just as a sidenote, its always better to add stylesheets before your js files.

提交回复
热议问题