Hello. I am new. Can you guys tell me how can i learn? I interested to making scripts but idk how i can learn. Can you guys tell me what i must do and not do? Many thanks.
And it says $ is undefined. But i did; // @require https://code.jquery.com/jquery-3.0.0-alpha1.min.js @Pyper
Put this as your first line. var $ = window.jQuery; I'm still new to writing scripts, but I'll try to help out where I can.
You should never have to do that (setting $). Include something more recent. Here's the most recent prod version for jQuery https://code.jquery.com/jquery-3.3.1.min.js.
Oh, the linter in the editor is saying that? The linter is wrong. It just doesn't know about the global variable being added from the @require. You need to add this to the top of the script under the metadata. Code: /* globals $ */ Then it will look like.