This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > | |
| </head> | |
| <body> | |
| <!-- source: http://www.zachleat.com/web/2010/02/24/array-sort/ --> | |
| <!-- The Fix: Don’t reuse the argument variables inside of an Array sort function: | |
| /* Changing the above example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // YUI trim - for browsers with no native String.trim() e.g. IE < 9 | |
| if (!String.prototype.trim) { | |
| String.prototype.trim = function () { | |
| try { | |
| return this.replace(/^\s+|\s+$/g, ""); | |
| } catch(e) { | |
| return this; | |
| } | |
| }; | |
| } |
OlderNewer