I’m trying to change the list view color like even odd,try both methods using the client script and custom app but still its not applying on list.can any one help me how i can do this
@ibashirbwn write a client script on list and try this code :
$(".list-row-container").each(function(i,onj){
if (i%2==0){
$(this).css('background-color', 'gray');
}
})
3 Likes
Does not work
refresh:function(listview){
$(".list-row-container").each(function(i,onj){
if (i%2==0){
$(this).css('background-color', 'green');
}
})
listview.refresh();
}
1 Like
Any hint/suggestion for condition based on a value from the document/row?
For instance, if the document has (checkbox field: Warning → TRUE) then highlight.
refresh: function(listview) {
$(“.list-row-container”).each(function() {
var warning = $(this).find(‘.filterable[data-filter=“warning,=,1”]’).length > 0;
if (warning) {
$(this).css('background-color', 'red');
}
});
listview.refresh();
}
1 Like