I have a repeater that I have a collapsed box inside. I would like the box to expand upon mousein but only if there is data in the collection for that item. I have the box showing upon mouse in but it does it for every repeated item
Where is your code?
w . onReady ( function () {
$w ( ‘#container5’ ). onMouseIn (() => {
toggleBox ( $w ( ‘#box9’ ));
});
});
function toggleBox ( boxElement ){
const isCollapsed = boxElement . collapsed ;
if ( isCollapsed ) {
boxElement . expand ();
} **else** {
boxElement . collapse ();
}
}
$w . onReady ( function () {
$w ( ‘#container5’ ). onMouseOut (() => {
toggleBox ( $w ( ‘#box9’ ));
});
});
$w.onReady(()=>{
$w('#yourRepeaterIDhere').onItemready(($item, itemData, index)=>{
$item('#container5').onMouseIn(()=> {
toggleBox($item('#box9'));
});
$item('#container5').onMouseOut(() => {
toggleBox($item('#box9'));
});
});
});
function toggleBox(boxElement){
if (boxElement.collapsed) {boxElement.expand();}
else {boxElement.collapse();}
}
Ok so now I only want the box to show if there is an item in the testimony column of database1