Created
November 11, 2023 12:34
-
-
Save malipetek/d803381292636a36e6ebc74c31c258b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Convert this script from jquery to vanilla js. Be careful about null scenarios, for example when you convert $('.class').show() to document.querySelector('.class').style.display = 'block' keep in mind result of querySelector might be null. I solve this issue like this: (document.querySelector('.class') || { style: {}}).style.display = 'block' | |
Also use fetch and es6 as much as you can. | |
Do not make any explanations, only try to convert and comment the parts you think can not be converted easily. | |
Here is the script: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment