Hi guys,
I would like to hide a label and a list when the list is empty.
You can see on the screenshot, I would like to hide the "Your recent activity" label and list below.
Any ideas on how to do it?
Thanks
Hi Vincent,
You can use the following functions to hide/show a component:
preApperyio("componentName").hide();
Apperyio("componentName").show();/preWhere 'componentName' is a component name.
Thank you Katya.
And how do I count the number of elements in the list?
Thanks,
PS: Even better than the number of elements in the list would be to get the number of elements returned by the REST Json service that returns the "recent activity".
How could I get the number of elements returned by the service in Javascript?
Thank you!
Ok I found the solution : when you execute Javascript after a service you have the "data" argument passed to the function. So I counted the items in the data object.
Hello Vincent,
Thank you for feedback, glad it works!