javascript detect touch
function isTouchScreendevice() {
return 'ontouchstart' in window || navigator.maxTouchPoints;
};
if(isTouchScreendevice()){
alert("I am a touch screen device")
}/* npm i tappify */
import Tappify from "tappify";
/* Only works in react.js */
function myComponent() {
return <>
<Tappify.Finger>
Client is using finger *tap tap*
</Tappify.Finger>
<Tappify.Cursor>
Client is using mouse cursor *click click*
</Tappify.Cursor>
</>
}
//more info: https://github.com/asplunds/tappify
Also in JavaScript:
- align text center react native
- appinsights trackException javascript
- jquery add element to array
- check if string only contains integer digits numbers javascript
- how to send data using ajax
- button style in jquery datatable
- hide checkbox jquery
- usb react native device not found
- cordova delete cache
- ngingx proxy express get real ip
- aws lambda dynamodb nodejs scan
- single if statement js true false
- ignore node_modules
- javascript get 24 hour time
- How do you wait for 5 seconds in JavaScript?
- i18n react meta description
- beautify json python
- set element at index javascript array and create new array
- js get date in ms
- angular ngclass
- javascript find the min in array of numbers
- JavaScript function that generates all combinations of a string.
- jquery copier dans le presse papier
- java serialize object to json