check if cursor is window javascript code example
Example 1: javascript detect cursor
import Tappify from "tappify";
function myComponent() {
return <>
<Tappify.Finger>
Client is using finger *tap tap*
</Tappify.Finger>
<Tappify.Cursor>
Client is using mouse cursor *click click*
</Tappify.Cursor>
</>
}
Example 2: determine if the cursor in the javascipt is div
<!DOCTYPE html>
<html>
<body>
<img onmouseover="bigImg(this)" onmouseout="normalImg(this)" border="0" src="smiley.gif" alt="Smiley" width="32" height="32">
<script>
function bigImg(x) {
alert("kursor klick")
}
</script>
</body>
</html>