Simulating the Click Event on Firefox
1 2 3 4 5 6 7 8 9 10 11 12 | if(navigator.appName.indexOf("Explorer")== -1) { // Simulates the click() event for gecko based browsers HTMLElement.prototype.click = function() { var evt = this.ownerDocument.createEvent('MouseEvents'); evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null); this.dispatchEvent(evt); } } |
Source : Unknown
Drop me a line and I will provide credit
Categories: Web Development
Recent Comments