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 tutto...

Bookmark: image resizing in JavaScript


On Mozilla Hacks: (using canvas) Jose Frichter (Lanczos resizing) Canvas and Lanczos resizing Enzo Moretti (Using Web Workers for Lanczos resizing)

Leggi tutto...

Use of the native javascript forEach


The forEach method in JavaScript is a standard from the new ECMA5 script specifications. It can be used as it is if the applied to a node list, such as something returned from a function like document.querySelectorAll(”) or […]

Leggi tutto...

JavaScript best practices


When you work in a large project all the developers should write code readable and that look like written by one person only. If this doesn’t happen the result is that other developers have to spend time trying […]

Leggi tutto...