function order() {
        if (settings.state.orderBy) {
            $(".activeorderby").removeClass("activeorderby");
            $('#orderby_' + settings.state.orderBy).addClass("activeorderby");
            settings.currentResults = _.sortBy(settings.currentResults, function (item) {
                if (settings.state.orderBy == 'RANDOM') {
                    return Math.random() * 10000;
                } else {
                    return item[settings.state.orderBy];
                }
            });
        }
    }
/**
     * Orders the currentResults according to the settings.state.orderBy variable
     */
Orders the currentResults according to the settings.state.orderBy variable
Orders the currentResults according to the settings . state . orderBy variable
function order() {
        if (settings.state.orderBy) {
            $(".activeorderby").removeClass("activeorderby");
            $('#orderby_' + settings.state.orderBy).addClass("activeorderby");
            settings.currentResults = _.sortBy(settings.currentResults, function (item) {
                if (settings.state.orderBy == 'RANDOM') {
                    return Math.random() * 10000;
                } else {
                    return item[settings.state.orderBy];
                }
            });
        }
    }
function order ( ) { if ( settings . state . orderBy ) { $ ( ".activeorderby" ) . removeClass ( "activeorderby" ) ; $ ( '#orderby_' + settings . state . orderBy ) . addClass ( "activeorderby" ) ; settings . currentResults = _ . sortBy ( settings . currentResults , function ( item ) { if ( settings . state . orderBy == 'RANDOM' ) { return Math . random ( ) * 10000 ; } else { return item [ settings . state . orderBy ] ; } } ) ; } }
Orders the currentResults according to the settings.state.orderBy variable
Orders the currentResults according to the settings . state . orderBy variable