You will need to use document.createEvent and event.initMouseEvent:
var element = document.querySelector('.left-rail-facets .facet-list .facet.CS .suggestion[data-value="B"] a'); //or var element = jQuery('.left-rail-facets .facet-list .facet.CS .suggestion[data-value="B"] a')[0]; var elementRect = element.getBoundingClientRect(); var mouseEvent = document.createEvent('MouseEvents'); mouseEvent.initMouseEvent('mousedown', true, true, window, 0, elementRect.left, elementRect.top);
source share