{"id":1823,"date":"2012-06-20T18:04:23","date_gmt":"2012-06-21T01:04:23","guid":{"rendered":"http:\/\/eloine.com\/blog\/?p=1823"},"modified":"2015-08-19T23:18:49","modified_gmt":"2015-08-20T06:18:49","slug":"how-to-alternate-table-row-colors","status":"publish","type":"post","link":"https:\/\/eloine.com\/blog\/archives\/1823","title":{"rendered":"How to alternate table row colors"},"content":{"rendered":"<p>Just had to share a snippit. I have been trying to alternate row colors globally and haven&#8217;t had luck in IE with this bit of CSS<\/p>\n<pre>tr:nth-child(even) {\r\n\u00a0\u00a0\u00a0 background-color: #ccc;\r\n}<\/pre>\n<p>It doesn&#8217;t work in most IE browsers and then I found this bit of jQuery and it seems to work like a charm!<\/p>\n<pre>$(document).ready(function()\r\n{\r\n\u00a0 $(\"tr:even\").css(\"background-color\", \"#ccc\");\r\n});<\/pre>\n<p>[button link=&#8221;http:\/\/www.losmedanos.edu\/directory\/&#8221; color=&#8221;orange&#8221;] Check it out[\/button]<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just had to share a snippit. I have been trying to alternate row colors globally and haven&#8217;t had luck in IE with this bit of CSS tr:nth-child(even) { \u00a0\u00a0\u00a0 background-color: #ccc; } It doesn&#8217;t work in most IE browsers and then I found this bit of jQuery and it seems to work like a charm! [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[123,124,8],"tags":[],"class_list":["post-1823","post","type-post","status-publish","format-standard","hentry","category-tutorial","category-tutorials","category-web-design"],"_links":{"self":[{"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/posts\/1823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/comments?post=1823"}],"version-history":[{"count":8,"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/posts\/1823\/revisions"}],"predecessor-version":[{"id":3064,"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/posts\/1823\/revisions\/3064"}],"wp:attachment":[{"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/media?parent=1823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/categories?post=1823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eloine.com\/blog\/wp-json\/wp\/v2\/tags?post=1823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}