Detect Mac or PC with Jquery

Definition and Usage

The userAgent property returns the value of the user-agent header sent by the browser to the server. The value returned, contains information about the name, version and platform of the browser.

Note: This property is read-only.

best website to make own custom path

https://bennettfeely.com/clippy/

 Syntex

if (navigator.userAgent.indexOf('Mac OS X') != -1) {
  $("body").addClass("mac");
} else {
  $("body").addClass("pc");
}

 

 Live Example

admin
Leave a Reply

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages