I hava a list which hava a image and a number data on it.
When the number 10, I want show image A on the list,
and when the number < =10 , I want show image B on it.
so list would like:
A(image) 11
A(image) 22
B(image) -11
I try to write some js code when the service set the number to the list element at data mapping page[ADD JS].
I wrote:
function(value, element) {
if (value 10) {
element.parent().find($('image-componet-name')).attr("src", Appery.getImagePath("A.png"));
}else {
element.parent().find($('image-componet-name')).attr("src", Appery.getImagePath("B.png"));
}
But it not work,
I think the "element.parent().find($('image-componet-name'))" is not right,
I want to know how to set a element according to another 's value in a list.
Anyone can help me?