Hello everyone,
I was wondering if I could get some help with creating a code for my repeater.
I have very, very little experience with coding, the only thing I've done is copy and paste a code that lets me have hidden boxes that reveal when I mouse over some text.
Each text has a unique code ID that is tied to a box, for example #text1 reveals #box1, #text2 reveals #box2 and so on.
The code I am using for my hidden box + text combo is:
export function text1_mouseIn(event) { //Add your code for this event here: $w('#box1').show("fade", {"duration": 300}); } export function text1_mouseOut(event) { //Add your code for this event here: $w('#box1').hide("fade", {"duration": 300}); }
The problem I'm having now is I have started to use repeaters and these texts that reveal the boxes are in the repeater. This means they all share the same code ID so now they are all #text1 and this makes it impossible for me to link each text to a different box.
I contacted WiX about this and they linked me to a repeater VELO page as well as 2 others and honestly I just can't wrap my head around it.
So I was wondering if someone here can please help me in making the code to give unique code ID's to items in a repeater.
Thanks
This is one of the things I have tried but I am getting a problem where $item is not picking up anything.
I have wrote the code exactly how you wrote it with a change to the box name and it doesn't work.
Here is a screenshot of the code:
The thing is the original hidden box/mouse over code still works but the problem is in repeaters everything shares the same ID as shown below:
Because of this all the texts in the repeater will reveal the same 1 hidden box because that box is tied to #text294.
I have been trying something else too which is another code I copied and pasted from a guide on WiX (with changes to ID names and I changed the onclick to onmousein):
I believe this is what I am looking for because it seems to be giving repeated items an individual ID which will allow me to tie hidden boxes to different text.
I added the hidden box/mouse over code at the bottom but its not working, when I highlight export it says the code needs to be at the top but that didn't change anything.
I am still trying other things out and reading more guides but I'll be honest I'm struggling.
Where is your full-code?
Where is the mentioned REPEATER-CODE ?
Or did you connect your repeater through dataset and properties panel ?
What is your full-setup ?