Search posts, tags, users, and pages
Madza
Tools. ๐ Resources. ๐ All things productivity. ๐ฏ๐๐ฏ
In our developer workflow, we often encounter challenging problems that might require just a few lines of code to be solved. In this article, I attempted to compile useful snippets that may assist you when working with URLs, DOM, events, dates, user ...
Mateusz Pigula
Don't you have a mistake in the 7th snippet? '#my-element' is just a string. We should pass there document.querySelector('#my-element') or ref, or query for an element inside the onClickOutside function, right?
'#my-element'
document.querySelector('#my-element')
onClickOutside
Adil Rasheed
Iam a react developer having one year experience
nice
Thanks a lot ๐๐ฏโจ
Matt Lawrence
Host of the HTML All The Things Podcast & Web Developer
As a person that doesn't write JavaScript too often, this is a great resource, thanks!
Glad you found it useful ๐โจ๐ฏ
Csaba Kissi
Full-Stack Solopreneur
Some cool tips here mate!
Really useful!
Means a lot, thanks Csaba! ๐โจ๐ฏ
Franklin Mayoyo
I must share this!! Continue doing the good work
Thank you so much ๐โจ๐ฏ
Muzzammil
Learner
Awesome tips Dude. Thanks for sharing. ๐๐๐๐๐๐๐๐๐
My pleasure, Muzzammil ๐๐ฏ๐
Mateusz Pigula
Don't you have a mistake in the 7th snippet?
'#my-element'is just a string. We should pass theredocument.querySelector('#my-element')or ref, or query for an element inside theonClickOutsidefunction, right?