faketouches.js
function triggerMouse(type) {
        var names = {
            start: 'mousedown',
            move: 'mousemove',
            end: 'mouseup'
        };

        var event = document.createEvent('Event');
        event.initEvent(names[type], true, true);
        var touchList = this._createTouchList(this.touches);
        if(touchList[0]) {
            event.pageX = touchList[0].pageX;
            event.pageY = touchList[0].pageY;
            event.clientX = touchList[0].clientX;
            event.clientY = touchList[0].clientY;
            event.button = 0;
        }
        return this.element.dispatchEvent(event);
    }
function triggerMouse(type) {
        var names = {
            start: 'mousedown',
            move: 'mousemove',
            end: 'mouseup'
        };

        var event = document.createEvent('Event');
        event.initEvent(names[type], true, true);
        var touchList = this._createTouchList(this.touches);
        if(touchList[0]) {
            event.pageX = touchList[0].pageX;
            event.pageY = touchList[0].pageY;
            event.clientX = touchList[0].clientX;
            event.clientY = touchList[0].clientY;
            event.button = 0;
        }
        return this.element.dispatchEvent(event);
    }
function triggerMouse ( type ) { var names = { start : 'mousedown' , move : 'mousemove' , end : 'mouseup' } ; var event = document . createEvent ( 'Event' ) ; event . initEvent ( names [ type ] , true , true ) ; var touchList = this . _createTouchList ( this . touches ) ; if ( touchList [ 0 ] ) { event . pageX = touchList [ 0 ] . pageX ; event . pageY = touchList [ 0 ] . pageY ; event . clientX = touchList [ 0 ] . clientX ; event . clientY = touchList [ 0 ] . clientY ; event . button = 0 ; } return this . element . dispatchEvent ( event ) ; }
trigger mouse event
@param type
@returns {Boolean}
trigger mouse event