Note: This uses Paul Irish's requestAnimationFrame polyfill for better animation performance.
Thursday, February 20, 2014
Tuesday, February 18, 2014
Shuffle an array
A very simple and useful technique:
aIndexes.sort(function () { return .5 - Math.random(); });
Etiquetes de comentaris:
JavaScript
Monday, February 17, 2014
Filter a list by typed text
This is used to show the rows in a list that match a given text and hide the rest.
The typed text is marked in bold on every shown row.
HTML:
JavaScript:
Demo:
Subscribe to:
Posts (Atom)