Hello
Code: Select all
I have the below javascript code in mapping that works if I hard code a VALUE but if I call the value from a localstorage array using mapping the code does not work. The value of the database is ('10-15 20-6 5')
The code should display 10-15 20-6 in the grid
and the grid should be grey on top and red on the bottom.
var gridValue = value;
var tour = gridValue.slice(-1);
var tours = gridValue.substring(0, gridValue.length - 1);
if (tour < 1) {
Appery('grid_1').css({'background': 'linear-gradient(red 50%, #b3b3b3 50%)'});
} else if (tour < 6) {
Appery('grid_1').css({'background': 'linear-gradient(#b3b3b3 50%, red 50%)'});
} else {
Appery('grid_1').css({'background': 'linear-gradient(red 50%, red 50%)'});
}
return tours;
Thank you