Uncaught ReferenceError: $ is not defined? 的解決方法
明明之前好用的程式碼突然報了這個錯誤,找了半天發現竟然是匯入jquery.min.js 的順序的問題
Just to be sure this is clear: you cannot put
the script reference to jquery-ui before the jquery script itself. That's what fixed the problem to me: first jquery-x.x.x.min.js, then jquery-ui-xxxxxx.js.
把jquery.min.js放到前面就行了。