public function WebformScrollTopCommand::__construct in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Ajax/WebformScrollTopCommand.php \Drupal\webform\Ajax\WebformScrollTopCommand::__construct()
Constructs a WebformScrollTopCommand object.
Parameters
string $selector: A CSS selector.
string $target: Scroll to target which can be 'form' or 'page'. Defaults to 'form'.
File
- src/
Ajax/ WebformScrollTopCommand.php, line 36
Class
- WebformScrollTopCommand
- Provides an Ajax command for scrolling to the top of an element.
Namespace
Drupal\webform\AjaxCode
public function __construct($selector, $target = 'form') {
$this->selector = $selector;
$this->target = $target;
}