lightwalker01
4/11/2014 - 3:04 PM

IE <=8 JS Fixes

IE <=8 JS Fixes

if (!Array.isArray) {
    //underscorejs version
    Array.isArray = function (arg) {
        return _.isArray(arg);
    };
}

if (typeof String.prototype.trim !== 'function') {
    
    //jquery version
    String.prototype.trim = function () { return $.trim(this) };
    
    //pure js version
    //String.prototype.trim = function () {
    //    return this.replace(/^\s+|\s+$/g, '');
    //}
}