class ScrollTopCommand implements CommandInterface (View source)

Provides an AJAX command for scrolling to the top of an element.

This command is implemented in Drupal.AjaxCommands.prototype.viewsScrollTop.

Properties

protected string $selector

A CSS selector string.

Methods

__construct(string $selector)

Constructs a \Drupal\views\Ajax\ScrollTopCommand object.

render()

Return an array to be run through json_encode and sent to the client.

Details

__construct(string $selector)

Constructs a \Drupal\views\Ajax\ScrollTopCommand object.

Parameters

string $selector

A CSS selector.

render()

Return an array to be run through json_encode and sent to the client.