# Pagination results from a repeater stuck at the bottom

**URL:** <https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708>\
**Category:** Ask the community\
**Tags:** wix, code\
**Created:** [December 15, 2024, 10:19pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708 "2024-12-15T22:19:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 15, 2024, 10:19pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/1 "2024-12-15T22:19:25Z")

</div>

How can I make pagination to show results at the top of the repeater and not at the bottom of the webpage?

I’m new to Wix and code. I’m using the Wix Editor for my website.  
It is a simple one-page without a header and footer. Image section, Two dropdown fields to filter results from the repeater and the pagination.

I’m hoping this is the right code if not I will be happy for guidance.  
The code from the ON Click:  
// Velo API Reference: [Velo Docs](https://www.wix.com/velo/reference/api-overview/introduction)

$w.onReady(function () {

```
// Write your Javascript code here using the Velo framework API

// Print hello world:
// console.log("Hello world!");

// Call functions on page elements, e.g.:
// $w("#button1").label = "Click me!";

// Click "Run", or Preview your site, to execute your code

```

});

$w(‘#pagination1’).onDblClick((event) =\> {

})

$w(‘#pagination1’).onClick((event) =\> {

})

Thank you all 🙂

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 16, 2024, 2:17pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/3 "2024-12-16T14:17:40Z")

</div>

Hi, Thanks for your reply. I know I can move the pagination above the repeater.  
I prefer not to do it like that. I prefer to jump to the top of the repeater area.

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 16, 2024, 3:11pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/5 "2024-12-16T15:11:41Z")

</div>

Yes. it sounds good. Yes I need help 🙏

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 17, 2024, 1:30pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/7 "2024-12-17T13:30:16Z")

</div>

can’t you post the code here?

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 17, 2024, 2:16pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/9 "2024-12-17T14:16:26Z")

</div>

Thanks, I replace the code or add to the code in the “on click” state?

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 17, 2024, 3:56pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/11 "2024-12-17T15:56:10Z")

</div>

I placed it. I got an error.  
This is the website: jobshub.co.il and this is where I want it to scroll

 ![screen 01](https://us1.discourse-cdn.com/wix/original/3X/8/5/85a7fd18ad6d7d151fecccebdb9e88cef6e5f074.png)

## My Error message:

## deploymentId: 2b3a2a82-3d42-4a84-b2b2-2d49d7716697 12/17/2024, 4:52:35 PM Status: Error

[/pages/Home.wsdzf.js]: public/pages/wsdzf.js: Unexpected character ‘‘’. (5:3)  
3 | $w.onReady(function () {  
4 | // Event listener for the pagination click

> 5 | $w(‘#pagination1’).onClick(() =\> {  
> | ^  
> 6 | // Scroll to the top of the page when pagination changes  
> 7 | scrollToTop();  
> 8 | });  
> [/pages/Home.wsdzf]:

---

<div class="post-metadata">

**Author:** ![codequeen](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/codequeen/32/88960_2.png) [@codequeen](https://forum.wixstudio.com/u/codequeen)\
**Post date:** [December 17, 2024, 4:17pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/12 "2024-12-17T16:17:21Z")

</div>

> [@user4309](#):
>
> $w(‘#pagination1’).onClick((event) =\> {
> 
> })

Your code is incomplete and the wrong event is being used. That is why the page does not scroll to the top after the pagination bar **changes**.

```javascript
$w('#pagination1').onChange(() => {
        $w('#someElementAtTheTopOfThePage').scrollTo();
    })

```

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 17, 2024, 4:39pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/13 "2024-12-17T16:39:22Z")

</div>

@codequeen Thanks. I need to add it to the code I got from Code\_Wizard ?

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 17, 2024, 5:20pm UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/14 "2024-12-17T17:20:32Z")

</div>

OK, I tried to play with the code position. Didn’t succeed. @codequeen can you please 🙏send me the all code in one shot? can it scroll to the top of the repeater and not the top of the page? Website link: jobshub.co.il

---

<div class="post-metadata">

**Author:** ![codequeen](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/codequeen/32/88960_2.png) [@codequeen](https://forum.wixstudio.com/u/codequeen)\
**Post date:** [December 18, 2024, 7:21am UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/15 "2024-12-18T07:21:34Z")

</div>

As you can see from my reply, I highlighted a piece of your original code and simply replaced it for you. That IS the entire code.

---

<div class="post-metadata">

**Author:** ![user4309](https://avatars.discourse-cdn.com/v4/letter/u/76d3ee/32.png) [@user4309](https://forum.wixstudio.com/u/user4309)\
**Post date:** [December 18, 2024, 9:22am UTC](https://forum.wixstudio.com/t/pagination-results-from-a-repeater-stuck-at-the-bottom/65708/16 "2024-12-18T09:22:21Z")

</div>

@codequeen Yappp… You are the Queen :crown:. Thank you. 🙏
