Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Hide Button in List Item

Hi
I have a button (pair) on a list item. I want it to be hidden based on the value of the label called cat on the same list item but it only hides the button on the first list item. All buttons on the rest of the list items should also be hidden because their value is not 16, but the button is not hidden.

This is my js for the "cat" label in the mapping.

if (value !== 16) {
Appery('mobilebutton_118').hide();
}
return value;

Image
Image
Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Hide Button in List Item

Hello Deon,

Please use JS below:pre$(this).closest("table").find("[name=mobilebutton_118]").hide(); /pre instead of:
preAppery("mobilebutton_118").hide(); /pre

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Hide Button in List Item

Nope. Still only does it to the 1st list item.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Hide Button in List Item

Please set a custom class to that button, and use it in the JS code, e.g.:

pre$(this).closest("table").find(".myClass").hide(); /pre

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Hide Button in List Item

I dont understand. What would the class code consist of? Nothing???

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Hide Button in List Item

Yes, you can use a class only in the JS code, without any CSS

Return to “Issues”