HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery eventelegram.dogtaKey Property</h1> <p>Hold 'meta' key and click on me</p> <p>In Windows OS 'Window' button is a metakey</p> <p>In Mac OS 'cmd(⌘)' button is a metakey</p> <script> $(document).ready(function(){ $("p:first-of-type").mousedown(function(e){ if(e.metaKey) alert("You Pressed metaKey"); else alert("metaKey was not pressed."); }); }); </script> </body> </html>
OUTPUT
×

Save as Private