---
name: "up.link.followOptions"
area: "API"
kind: "JavaScript function"
parent: "up.link module"
url: "https://unpoly.com/api/up.link.followOptions"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.link module](https://unpoly.com/api/up.link.md)</nav>

# up.link.followOptions(link)

Parses the [render](https://unpoly.com/api/up.render.md) options that would be used to [follow](https://unpoly.com/api/up.follow.md) the given link, but does not render.

<nav aria-label="Contents">

#### Contents

- [Example](#example)
- [Parameters](#parameters)
- [Return value](#return-value)

</nav>

## Example {#example}

Given a link with some `[up-...]` attributes:

```html
<a href="/foo" up-target=".content" up-layer="new">...</a>
```

We can parse the link's render options like this:

```js
let link = document.querySelector('a[href="/foo"]')
let options = up.link.followOptions(link)
// result: { url: '/foo', method: 'GET', target: '.content', layer: 'new', ... }
```

---

## Parameters {#parameters}

### link {#link}

(required)

The link from which to parse options.

Type: [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) | [jQuery](https://learn.jquery.com/using-jquery-core/jquery-object/) | string

---

## Return value {#return-value}

An object of [render options](https://unpoly.com/api/up.render.md#parameters).

Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects)

