Skip to content

Methods

Yannick Ebongue edited this page Dec 19, 2016 · 3 revisions

cancel()

Returns: jQuery (plugin only)

Triggers a click on the cancel command button.

  • This method does not accept any arguments.

Code examples:
Invoke the cancel method:

$( ".selector" ).pinpad( "cancel" );

clear()

Returns: jQuery (plugin only)

Clears the content of the pinpad input value.

  • This method does not accept any arguments.

Code examples:
Invoke the clear method:

$( ".selector" ).pinpad( "clear" );

confirm()

Returns: jQuery (plugin only)

Triggers a click on the confirm command button.

  • This method does not accept any arguments.

Code examples:
Invoke the confirm method:

$( ".selector" ).pinpad( "confirm" );

destroy()

Returns: jQuery (plugin only)

Removes the pinpad functionality completely. This will return the element back to its pre-init state.

  • This method does not accept any arguments.

Code examples:
Invoke the destroy method:

$( ".selector" ).pinpad( "destroy" );

disable()

Returns: jQuery (plugin only)

Disables the pinpad.

  • This method does not accept any arguments.

Code examples:
Invoke the disable method:

$( ".selector" ).pinpad( "disable" );

enable()

Returns: jQuery (plugin only)

Enables the pinpad.

  • This method does not accept any arguments.

Code examples:
Invoke the enable method:

$( ".selector" ).pinpad( "enable" );

instance()

Returns: Object

Retrieves the pinpad's instance object. If the element does not have an associated instance, undefined is returned.

Unlike other widget methods, instance() is safe to call on any element after the pinpad plugin has loaded.

  • This method does not accept any arguments.

Code examples:
Invoke the instance method:

var instance = $( ".selector" ).pinpad( "instance" );

option( optionName )

Returns: Object

Gets the value currently associated with the specified optionName.

Note: For options that have objects as their value, you can get the value of a specific key by using dot notation. For example, "foo.bar" would get the value of the bar property on the foo option.

  • optionName
    Type: String
    The name of the option to get.

Code examples:
Invoke the method:

var disabled = $( ".selector" ).pinpad( "option", "disabled" );

option()

Returns: PlainObject

Gets an object containing key/value pairs representing the current pinpad options hash.

  • This method does not accept any arguments.

Code examples:
Invoke the method:

var options = $( ".selector" ).pinpad( "option" );

option( optionName, value )

Returns: jQuery (plugin only)

Sets the value of the pinpad option associated with the specified optionName.

Note: For options that have objects as their value, you can set the value of just one property by using dot notation for optionName. For example, "foo.bar" would update only the bar property of the foo option.

  • optionName
    Type: String
    The name of the option to set.
  • value
    Type: Object
    A value to set for the option.

Code examples:
Invoke the method:

$( ".selector" ).pinpad( "option", "disabled", true );

option( options )

Returns: jQuery (plugin only)

Sets one or more options for the pinpad.

  • options
    Type: Object
    A map of option-value pairs to set.

Code examples:
Invoke the method:

$( ".selector" ).pinpad( "option", { disabled: true } );

output()

Returns: jQuery

Returns a jQuery object containing the output element of the pinpad. The output element is used to display the pinpad input value for human, while the pinpad input element is used for computing like data validation or data transmission.

  • This method does not accept any arguments.

Code examples:
Invoke the output method:

var output = $( ".selector" ).pinpad( "output" );

refresh()

Returns: jQuery (plugin only)

Renderizes the pinpad with its actual state.

  • This method does not accept any arguments.

Code examples:
Invoke the refresh method:

$( ".selector" ).pinpad( "refresh" );

value()

Returns: String

Gets the current value of the pinpad.

  • This method does not accept any arguments.

Code examples:
Invoke the method:

var value = $( ".selector" ).pinpad( "value" );

value( value )

Returns: jQuery (plugin only)

Sets the current value of the pinpad.

  • value
    Type: String
    The value to set.

Code examples:
Invoke the method:

$( ".selector" ).pinpad( "value", "10" );

widget()

Returns: jQuery

Returns a jQuery object containing the element visually representing the pinpad.

  • This method does not accept any arguments.

Code examples:
Invoke the widget method:

var widget = $( ".selector" ).pinpad( "widget" );