/uniqueID

Returns a unique identifier generated by the browser for an element

Primary LanguageJavaScriptMIT LicenseMIT

Codeship Status for renaatdemuynck/uniqueID

uniqueID shim

Internet Explorer has a property called uniqueID that generates a unique id. This shim provides the same functionality to other browsers.

The uniqueID property

Retrieves an autogenerated, unique identifier for the object.

Syntax

var id = object.uniqueID

Remarks

When you apply this property to the document object, the client automatically generates a new ID that you can assign to an element's id property.

A new ID is generated and assigned to the element the first time the property is retrieved. Every subsequent access to the property on the same element returns the same ID.

Note The unique ID generated is not guaranteed to be the same every time the document is loaded.