Posts tagged DOM


Detecting a click outside an element in JavaScript is a very common pattern that can be used to close a non modal user interface component like a flyout, a menu or a dropdown when the user clicks outside this element. While searching on the web there are a lot of

The HTML5 template element is a tag that isn’t used that much but is very useful to prepare reusable HTML structures that can be instantiated and populated with JavaScript. The DOM API and JavaScript don’t offer any native data binding. Though with the template element we can implement