> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/manipulation/.scrollto.md).

# .scrollTo()

### `scrollTo(options)`

```
$('#section').scrollTo();
```

#### Use cases

Use `.scrollTo()` to:

* Bring validation feedback into view.
* Navigate to a selected section.

#### More examples

Scroll to form errors after validation:

```javascript
$('#form-errors').scrollTo({ behavior: 'smooth', block: 'center' });
```

#### Parameters:

* `options`: Configuration object (e.g., `{ behavior: 'smooth', block: 'center' }`).

#### Usage:

```javascript
$('#section').scrollTo({ behavior: 'smooth', block: 'center' });
```

This will scroll to where the element with the id of `section` is.

```javascript
$('#section').scrollTo();
```
