Hello everyone, I am very new to corvid so my apology’s if I ask a very stupid question.
I have a repeater connected to a dataset. I want to make it so that when you hover over an item in the repeater, the text inside that item changes. So only the text inside that item. I have tried multiple things, but I can’t get it to work. I found a similar discussion (https://www.wix.com/corvid/forum/community-discussion/change-an-individual-item-in-repeater-from-code) but that code doesn’t work. Any ideas?
Hi Alex Westerhof
Check here → https://www.wix.com/corvid/reference/$w/repeater/foreachitem
Assuming that your -
dataset is #dataset1
repeater is #repeater1
text is #text1
When the mouse hovers on the text, the text will change.
$w.onReady(function () {
$w('#dataset1').onReady( () => { //dataset
$w('#repeater1').forEachItem( ($item, itemData, index) => {
$item('#text1').onMouseIn((event)=>{
$item('#text1').text = "Hovered";
});
$item('#text1').onMouseOut((event)=>{
$item('#text1').text = "Back to Normal";
});
});
});
});
Ajith
Thank you so much for your quick response, it work great! Giving you a follow