up.layer up.layer.accept([value], [options])
JavaScript function

Accepts the current layer.

This is a shortcut for up.layer.current.accept(). See up.Layer#accept() for more documentation.


Acceptance

[value]
optional

The acceptance value that will be passed to { onAccepted } callbacks.

If there isn't an acceptance value, omit this argument. If you need to pass options without an acceptance value, pass null:

up.layer.accept(null, { animation: 'move-to-bottom' })
Type: any
[options.confirm]
optional

A message the user needs to confirm before the overlay is closed.

See Confirmation dialogs: Confirming before closing an overlay.

Type: string
[options.response]
optional

The server response that caused this overlay to close.

May be left blank if the overlay was not closed in reaction to a server response.

See Using the discarded response.

Type: up.Response

Animation

[options.animation]
optional

The animation to use for closing this layer.

Defaults to the close animation configured for this layer mode.

Type: string | Function(Element, Object)
[options.duration]
optional

The duration for the close animation in milliseconds.

Type: number
[options.easing]
optional

The timing function that controls the acceleration of the close animation.

Type: string
[options.onFinished]
optional

A callback that will run when the elements have been removed from the DOM.

If the layer has a close animation, the callback will run after the animation has finished.

Type: Function

History

[options.history=true]
optional

Whether to restore the parent layer's history state in the browser's address bar.

Type: boolean