This is a simple plugin for jQuery to allow conditional formatting. It separates the workload into smaller chunks and runs async to avoid keeping the browser busy for too long. The async properties along with other properties can be changed via the options parameter
$('table#mainTable td').condiFormat({'midColor': '#FFFFFF'});
- highColor
Color of the highest value. Default: #4CAF50 - midColor
Color of the middle value. Default: #FFEB3B - lowColor
Color of the lowest value. Default: #F44336 - midPoint
Value representing where the middle value will be at (percentage). Default: 0.5 - opacity
Opacity of the background-color that will be set. Default: 1 - invertColorAt
Color code sums (red + green + blue) under this value will have their text color convered to white. Default: 400 - readBatchSize
Items to read in one batch before allowing browser to take control for a bit. Default: 2000 - colorBatchSize
Items colored in one batch before allowing browser to take control for a bit. Default: 200 - transitionSpeed
Conditional formatting color transition speed in ms (0 = disabled). Default: 0 - callback
Allows passing a function that will be called once the coloring is finished. No default value