Select elements by dragging a box

You can select elements easily drawing a box with your mouse without using jQuery UI or third party plugins. Just handle 2 mouse events and check if at least one point of each element is within your box area.

Notice, that we are using a third event (as guidance) simply to draw the area.

In my first implementation, it was available to select any element by surrounding any of its corners or a minimum area inside it, but due to its complexity and most of the used scenarios, I decided to change the selection criteria to the center point with all elements same size.

Short tricks of HTML, CSS and JavaScript

Dear fellas, I’d like to share with you ^^ an article about tricks and basic concepts in HTML, CSS and JS. A list of How Tos for everyday use with easy and declarative approaches. Hope you like it (just with the header image I became a level 20 paladin)

Short tricks of HTML, CSS and JavaScript on Medium.

Saving and loading dates

Save your datetime always in UTC ISO and load it to the user interface using local ISO. Use native widgets to avoid facing date format preferences (middle endian, little endian, etc)

Autocomplete dropdown

Have you ever used autocomplete dropdowns from jQuery UI or Bootstrap third party options? A complete heavyweight mess.

Luckly, we got a couple of years ago an awaited solution: Native HTML5 Autocomplete dropdown with datalist. A lightweight standard supported in all devices.

Save your tooling time, use as few libraries and frameworks as possible!