You can detect if the visitor uses a mobile device:
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
// here my codes }
But how to turn this code into an if not (to get all devices that are not these ones)?
Maybe something like this?
if !(/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
// here my codes }
As you understand my question goes about standard syntax (I am learning).