Hello there! I’m trying to get something for my html template but I’m a noob in CCG and JS. What I want to do is if the text/data filled in the template through the client is empty, or there’s no text/data attached to that keyword, I want to hide the whole element.
I tried with something like:
if (data[‘keyword’] == “”) {
$(’#element’).addClass(“empty”);
}
But I can’t get it working. It works if I type some kind of text like “example” for that keyword, but it’s not working if there’s no data. Idk if I’m explaining myself tho.
Thank you in advance!