/**
* @param target can be any DOM Element or other EventTarget
* @param type Event type (i.e. 'click')
* @param event Placeholder for creating an Event
*/
function (target, type, event) {
var doc = document;
if (doc.createEvent) {
event = new Event(type);
target.dispatchEvent(event);
} else {
event = doc.createEventObject();
target.fireEvent('on' + type, event);
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.