Note: This post is a translation of this one. It deserved it.
A tip if you want to set yourself free from jQuery. I showed earlier this tip
to loop over DOM elements, but it’s kind of ugly:
That’s a lot of text. Using a plain
for might even be better. I just thought
about a solution that a lot of people should like! It probably exists somewhere
else, but I haven’t seen it :-)
This works on Firefox, Chrome and IE9. I didn’t try other browsers, but if it
works on IE…
Online demo on jsfiddle.
This opens up new ways to code. For example, the following works to validate
that all the
input fields are filled in:
Imagine! What new way could you find?