public function WebformScrollTopCommand::__construct in Webform 8.5
Same name and namespace in other branches
- 6.x src/Ajax/WebformScrollTopCommand.php \Drupal\webform\Ajax\WebformScrollTopCommand::__construct()
Constructs a \Drupal\webform\Ajax\ScrollTopCommand 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;
}