jQueryでstripe

jQueryでstripeな野良プラグインを考えてもらったはいいが、ちょっとイメージが違ったので自分でもやってみた。

サンプル

使うときはこんな感じで、odd のほうだけでもいい気がする。

$(function () {
  $("#z tr:nth-child(odd)").addClass("odd");
  $("#z tr:nth-child(even)").addClass("even");
});

javascript の中で色の値を指定するんじゃなくって、クラス名を指定して使いたいものだと思った。

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>