Hi everyone. I am VERY green… and a little embarrassed that I can’t figure this out on my own.
I have designed a website for a musician who would like to display a list of current and previous concerts.
I created a dataset that includes all of the relevant information and linked it to a repeater. For some of the concerts, there are two days that are displayed side by side. Everything functions beautifully on the desktop version, but when I view it on mobile, there is a large blank space.
Desktop Version:
If only one concert looks like this:
Mobile Version:
Mobile Version with only 1 Concert: (I want to get rid of the empty space)
After reading all the relevant threads I could find, I came across this code:
import wixData from 'wix-data';
$w.onReady(function () {
$w("#dataset1").onReady(() => {
var item = $w("#dataset1").getCurrentItem();
if (item["linkItemTwo"] === undefined)
$w("#button5").hide();
else $w("#button5").show() ;
});
});
My data set is also #dataset1. I changed linkItemTwo with the Field Key which is “secondDateandTime” and the field I wanted to hide on the site was #text126
It read:
import wixData from 'wix-data';
$w.onReady(function () {
$w("#dataset1").onReady(() => {
var item = $w("#dataset1").getCurrentItem();
if (item["secondDateandTime"] === undefined)
$w("#text126").hide();
else $w("#text126").show() ;
});
});
When I previewed the page with the code, the #text126 was gone across the page whether there was content in the dataset or not.
What am I doing wrong?
Any help is greatly appreciated!
-Allison