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

# up.modal.follow(linkOrSelector, [options])

**This feature has been deprecated**. Use [`up.follow(link, { layer: &quot;new modal&quot; })`](https://unpoly.com/api/up.follow.md) instead.

Load [`unpoly-migrate.js`](https://unpoly.com/changes/upgrading.md) to polyfill deprecated features.

Opens the given link's destination in a modal overlay.

---

## Parameters {#parameters}

### linkOrSelector {#linkOrSelector}

(required)

The link to follow.

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

### [options] {#options}

(optional)

See options for [`up.render()`](https://unpoly.com/api/up.render.md).

Type: string

---

## Return value {#return-value}

A promise that will be fulfilled when the modal has been opened.

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

