# Pull To Refresh

{% hint style="info" %}

<pre class="language-markup" data-overflow="wrap"><code class="lang-markup">You'll need to import the javascript file in your website before starting from this <a data-footnote-ref href="#user-content-fn-1">link</a>.
</code></pre>

{% endhint %}

Pull to Refresh is a feature that allows users to refresh the page or the content of the page by pulling down on the screen. It can be configured through the app's settings or programmatically using JavaScript. Whether the feature is disabled in the app settings, it can be re-enabled using a JavaScript function.&#x20;

{% tabs %}
{% tab title="Plain Javascript" %}
{% code overflow="wrap" %}

```
WTN.enablePullToRefresh(true);

//Pass values as true or false
//To enable pass true and to disable pass the value as false. By default Pull to refresh is enabled on all pages.
```

{% endcode %}
{% endtab %}

{% tab title="ES5+" %}
{% code overflow="wrap" %}

```
import { enablePullToRefresh } from "webtonative";

enablePullToRefresh(true);

//Pass values as true or false
//To enable pass true and to disable pass the value as false. By default Pull to refresh is enabled on all pages.
```

{% endcode %}
{% endtab %}
{% endtabs %}

> \*Feature was taken live on 17/05/2023

[^1]: <https://docs.webtonative.com/javascript-apis/getting-started>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webtonative.com/javascript-apis/pull-to-refresh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
