I'll help you get the syntax Blair, but I need a little more info.
What kind of page component is "market available"?
Is it obtaining it's value from a service? If so, when does it get that value?
Is there anything happening on the page that will change its value?
For the most part, when I show/hide something, I need to place the code in two places; once when the page is loaded or on the mapping(in order to initially set show or hide) and again whenever the user does something to change it's value (like on value change of a select menu).
If the component is getting its value by a mapping (like from a local storage or service) then I use this in its mapping:
if(!value){
Apperyio("market_available").hide();
}
return value;
That code is checking to see if the value being passed in the mapping is falsey, which null is considered. If so, it hides your page component. If not, it does nothing to the page component, and regardless, it passes its value through the mapping.
If you place the code on page load, then it would be like this:
var market = Apperyio("market_available").val();
if(market){
Apperyio("market_available").show();
} else {
Apperyio("market_available").hide();
}
That code is a bit unnecessary for the page load, but the good news is that is the same code that you can place on a value change event to show/hide it as the page is used.
It is basically checking to see if your component has a value, and if so, shows the component, but if not, hides it. It does this by grabbing the component's value and assigning that to a variable called "market", then doing its check on that variable.
That should get you there. If not, the answer to those questions I asked above will help, and so would a screenshot of the console log showing the error you get.