Search posts, tags, users, and pages
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 ...
Madza
@Madza
Tools. π Resources. π All things productivity. π―ππ―
Markdown supported Β· ββ΅ to post
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
nice
Thanks a lot ππ―β¨
Matt Lawrence
As a person that doesn't write JavaScript too often, this is a great resource, thanks!
Glad you found it useful πβ¨π―
Csaba Kissi
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
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?