asked on October 19, 2018
•
Show version history
Each row in my table changes color based on the priority radio button selected, High, Medium or Low. How can I have the resulting file, which is saved to the repository, maintain the TR color/CSS styling?
$(document).ready(function () {
// ==================================================
// CHANGE ROW COLOUR BASED ON PRIORITY SELECTION
// ==================================================
$('.aircraftTable').on('change','.priority input:radio', function() {
if ($(this).val() == "high")
{
$(this).closest("tr").addClass("highRow");
}
else {
$(this).closest("tr").removeClass("highRow");
}
if ($(this).val() == "med")
{
$(this).closest("tr").addClass("medRow");
}
else {
$(this).closest("tr").removeClass("medRow");
}
if ($(this).val() == "low")
{
$(this).closest("tr").addClass("lowRow");
}
else {
$(this).closest("tr").removeClass("lowRow");
}
});
// ==================================================
// END
// ==================================================
});
0
0