# Connecting a scrollTo function to a certain title, not to a selector

**URL:** <https://forum.wixstudio.com/t/connecting-a-scrollto-function-to-a-certain-title-not-to-a-selector/23337>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [April 4, 2019, 11:50am UTC](https://forum.wixstudio.com/t/connecting-a-scrollto-function-to-a-certain-title-not-to-a-selector/23337 "2019-04-04T11:50:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![contact13073](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/contact13073/32/10884_2.png) [@contact13073](https://forum.wixstudio.com/u/contact13073)\
**Post date:** [April 4, 2019, 11:50am UTC](https://forum.wixstudio.com/t/connecting-a-scrollto-function-to-a-certain-title-not-to-a-selector/23337/1 "2019-04-04T11:50:53Z")

</div>

Hello.

I am trying to connect a certain button (at the top of the page) to a specific item in a repeater (way down below)…  
While regular Wix anchors are not allowed inside a repeater, I am using the scrollTo function like this:

```javascript
export function button1_click(event) {
    $w("#itemName").scrollTo();
}

```

Problem is, the repeater items are coming from a DB collection so the items do not appear in the editor (only the first one), which means I don’t have a selector to connect the scrollTo with.  
I looked at the actual code of the published site and the items’ IDs are not something I can relate to in the scrollTo code.  
As oppose to the selector that I don’t have, I do know the title of each item which is coming from the DB. Is there a way to connect the scrollTo function to that title instead of the the selector of the item box?

Or alternately, is there a better way to achieve this?

Thank you!
