Skip to content
garafu edited this page Aug 5, 2013 · 4 revisions

public static property.
This object has follwing properties, and methods.

  • Properties
  • .type
  • .original
  • .tablet
  • .mobile
  • .pc
  • .ipad
  • .iphone
  • .ipod
  • .android
  • .windowsphone
  • .windows
  • .mac
  • .linux
  • .x86
  • .x64
  • .arm
  • .ia64
  • .unknown
  • Methods
  • .initialize( string )
  • .is( string )

.type

type : string
This property has identified string of platform type.

.original

type : string
This property has identified string of platform name.

.tablet

type : boolean
Get the value indicating whether the platform is "tablet" or not. When client is iPad or Android tablet, this property indicates true.

.mobile

type : boolean
Get the value indicating whether the platform is "mobile phone" or not. When client is Android phone, iPhone, iPod, Windows Phone, BlackBerry or Symbian, this property indicates true.

.pc

type : boolean
Get the value indicating whether the platform is "desktop pc" or "note pc". When client is Windows, Linux, Mac, this property indicates true.

.ipad

type : boolean
Get the value indicating whether the platform is "iPad" or not.

.iphone

type : boolean
Get the value indicating whether the platform is "iPhone" or not.

.ipod

type : boolean
Get the value indicating whether the platform is "iPod" or not.

.android

type : boolean
Get the value indicating whether the platform is "Android tablet", "Android mobile phone".

.windowsphone

type : boolean
Get the value indicating whether the platform is "Window Phone" or not.

.windows

type : boolean
Get the value indicating whether the platform is "window" or not.

.mac

type : boolean
Get the value indicating whether the platform is "Macintosh" or not.

.linux

type : boolean
Get the value indicating whether the platform is "Linux" or not.

.x86

type : boolean
Get the value indicating whether the platform is 32bit OS or not.

.x64

type : boolean
Get the value indicating whether the platform is 64bit OS or not.

.arm

type : boolean
Get the value indicating whether the platform is ARM OS or not.

.ia64

type : boolean
Get the value indicating whether the platform is Itanium OS or not.

.version

type : version
Get the platform version, if can detect.
See $.browser.version.

.unknown

type : boolean
Get the value indicating whether the client platform can not detect.

.initialize( string )

Initialize PlatformInfo class instance. This method set properties according to the given string.

Syntax:

private {void} initialize(
        {string} useragent
)

Parameter:

  • {string} useragent
    userAgent string.

Return:

  • {void}
    no return value.

.is( string )

Get the value indicating whether the current browser is equal to the specified browser or not.

Syntax:

public {boolean} is(
        {string} type
)

Parameter:

  • {string} type
    Platform type string.

Return:

  • {boolean}
    Whether the current platform is equal to the specified platform type.

Clone this wiki locally