When I right-click on my #texte div, a contextMenu is called.
<div id="texte" >
<p>Bla bla bla</p>
</div>
What I want to do is: to simulate the right-click on that area by clicking on another button. For example by clicking this:
<div id="otherDiv">
<form>
<input type="submit" value="Check" onclick="check()" />
</form>
</div>
Is it possible?
I already tried the trigger fucntion like this:
function check() {
$('#texte').trigger({
type: 'mousedown',
which: 3
});
//$('#btn-replace-accept_texte').trigger('click');
}
but it doesn't work.
Thanks for your help!