Created
June 4, 2022 13:08
-
-
Save Octagon-simon/50a75ce67d4f0688bb5e793caea30497 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
| //attach event listener | |
| document.querySelector('#inp_search').addEventListener('input', function(){ | |
| //store the search query | |
| let value = this.value.trim(); | |
| //check if value is not empty | |
| if(value){ | |
| }else{ | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment