Snippet – how to calculate the total height of the document with JavaScript


I needed for a project, I’m working on to calculate the total height of the document, not just the height of the visible view or of a particular element.

Leggi Articolo

How to detect correctly the event handler using jQuery


The event handler on touch and desktop devices Basically the iPad, or in general touch based devices haven’t any “click” event. Instead we have a “touch” event. How can we handle them correclty? So the solution is simple and elegant: once detected the device we assign the correct event handler to a variable and then we can use it, without […]

Leggi Articolo