From 649d3a057c9afc304dc30547a4ffd0cdff950bd3 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 30 May 2014 16:26:40 -0500 Subject: [PATCH] Move list table odd row styles to pure CSS --- scp/css/scp.css | 4 ++-- scp/js/scp.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scp/css/scp.css b/scp/css/scp.css index 345c3b1be..af34d9c77 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -454,9 +454,9 @@ table.list tbody td { } table.list tbody td { background: #fff; padding: 1px; padding-left:2px; vertical-align: top; } -table.list tbody tr.odd td { background-color: #f0faff; } +table.list tbody tr:nth-child(2n+1) td { background-color: #f0faff; } table.list tbody tr:hover td { background: #ffe; } -table.list tbody tr.odd:hover td { background: #ffd; } +table.list tbody tr:nth-child(2n+1):hover td { background: #ffd; } /* row highlighting on hover + select */ table.list tbody tr:hover td, table.list tbody tr.highlight td { background: #FFFFDD; } /* disabled highlighting on nohover */ diff --git a/scp/js/scp.js b/scp/js/scp.js index 8559f909e..dfc3142fc 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -32,7 +32,6 @@ function checkbox_checker(formObj, min, max) { var scp_prep = function() { $("input:not(.dp):visible:enabled:first").focus(); - $('table.list tbody tr:odd').addClass('odd'); $('table.list input:checkbox').bind('click, change', function() { $(this) .parents("tr:first") -- GitLab