Custom event handler in Javascript
Overall it looks pretty good. There are a couple of improvements.


Stylistically, JavaScript doesn't place the { character on a new line. You'll see it start on the same line separated by one space:

function Events() {
    // ...
}

if (condition) {
    // ...
} else if (condition) {
    // ...
} else {
    // ...
}

Since you are not using any function closure variables, there is no need to recreate the on and trigger methods each time the Events constructor function is called. Use the prototype property instead:

function Events() {
    this.stack = [];
}

Events.prototype = {
    stack: null,

    constructor: Event,

    on: function (event, callback) {
        // ...
    },

    off: function (event, callback) {
        // ...
    },

    trigger: function (event, data) {
        // ...
    }
};

You could remove the need for the new operator with a little constructor function trickery:

function Events() {
    if (!(this instanceof Events)) {
        return new Events();
    }

    this.stack = [];
}


This would allow you to generate a new Events object by calling Events():

Events().on("foo", function(event) {
    // ...
});

The word Events makes this seem like a collection of existing events. Really you've created an event dispatcher, and EventDispatcher feels like a better name.