note 93868 deleted from language.operators.logical by danbrown

From: Date: Mon, 05 Oct 2009 14:34:38 +0000
Subject: note 93868 deleted from language.operators.logical by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161358@lists.php.net to get a copy of this message
Note Submitter: mcluvin at sogetthis dot com ---- @daevid Better still, don't do it with PHP. Since zebra-striping is purely cosmetic, have your UI library handle it. JQuery can do it in one line: <code> $('tr').addClass('dataRow1').filter(':even').addClass('dataRow2'); </code> For 1, this removes the load on your server. For 2 it keeps your html, php, and css all cleaner. If people disable javascript, they're missing what today's web offers, and zebra-striping hasn't been shown to improve efficiency anyway. Another good alternative is pure css: <code> tr:hover {background-color:lightgray} </code> which highlights the row the mouse is over. Either way, if you're doing it with php you're not doing it well.

« previous php.notes (#161358) next »