Simulate a right click on another div
When I right-click on my #texte div, the Menu context is called.
<div id="texte" >
<p>Bla bla bla</p>
</div>
I want to do the following: simulate a right-click on this area by clicking on another button. For example, by clicking on this:
<div id="otherDiv">
<form>
<input type="submit" value="Check" onclick="check()" />
</form>
</div>
Is it possible?
I have already tried triggering a trigger as follows:
function check() {
$('#texte').trigger({
type: 'mousedown',
which: 3
});
//$('#btn-replace-accept_texte').trigger('click');
}
but that will not work.
Thank you for your help!
+4
No one has answered this question yet.
See similar questions:
or similar: