I wish that once I "On mouse in" on specific repeater item, element inside of repearer will show

I wish that once I “On mouse in” on specific repeater item, element inside of repearer will show

This code doesn work

$w("#RepeterVypis").onItemReady(($item, itemData, index) => {
  $item("#RepeterVypisItem").onMouseIn(() => {
    $item("#Termin-cesty-prehled").show();
  });
});

This code shows that at all repeaters items

$w("#RepeterVypisItem").onMouseOut(() => {
	$w("#Termin-cesty-prehled").show();
});

Not sure of the error, but you’re using onMouseIn in one snipper and onMouseOut in the other - perhaps that makes a difference?

As for the second code, yes - $w scopes the general element within the page’s context, since it’s not a specific item’s element - That’s what $item is for

What you want is to find the specific item in the repeater (#repeaterElement) and when the mouse is over it that element will be revealed.

Try this code. Just adjust the element names and put it anywhere inside the page’s onReady() statement. You could also have it show another repeater element with a little tweaking.

$w("#repeaterElement").onMouseIn( (event) => {
  let $item = $w.at(event.context)
  $item("#repeaterElement").show();
});

Hi, predseda !!

For now, how about adding console.log("onItemReady!!"); inside the onItemReady callback to confirm whether this callback is actually being executed? :raised_hands:

I confirm that console.log(“onItemReady!!”); give me 9 rows which is same amount as amoun of items in the repeater. So I believe that this function works

Hi I tried that and it doesnt work. Do you have any other ideas please? What elso I should share with to.

Can you take a screenshot of your element and your code?

I have a feeling you are trying to do hide/show but it’s possible that the element is collapsed instead of hidden.

Therefore the code should say .expand not .show

Thank you very much. Here is print schreen.

none of mentioned codes in the attachment does work.

1 Like

Thanks for sharing a screenshot.

Ok, I have attached your screenshots with some notes.

Use the code panel and checkmark “hidden”. This will keep element hidden when the page first loads.

Delete the code in between the yellow lines.

Move your other code inside the yellow lines.

Delete the last code altogether.


Hey! It works !!! Thak you very much for your time and effort (Later during day Ill try to implement on more places, but I think that it will work)

How can I consult with you more thinks which I struggle?

1 Like

Glad it worked for you!

I can be for hire for coding guidance, writing code, and general Wix projects.

Email: nayeli@codequeen.us
Website: www.codequeen.us

At the moment I do not have availability until January for consultations and late February for code projects.

Every now and then, during my free time, I try to visit the Studio Forum here or the Facebook groups to answer questions.

There are many new and experienced coders in the forum that help out also.

The best way to troubleshoot is to post screenshots or videos.

Even when code is written correctly, it can be written in the wrong place, it can have an incorrect setting somewhere else, etc.

Happy Coding!

Love,
Code Queen :princess:

Hi, I wrote you email, hopefully you got it, or we can by in touch via WhastApp +420 603 534 730