I'm using jQuery and the Zebra widget to produce alternately colored rows on
my tables. It works great but it kills my CSS colgroup functions. For
example, the following code...
<table class="sortphp" id="myTable">
<colgroup style="background: #0ff;"></colgroup>
<colgroup style="background: #ff0;"></colgroup>
<thead>
...should produce a table where every cell in the first column is aqua,
every cell in the second yellow. But if my Zebra widget dictates that
alternate rows are gray and white, then EVERY cell in every row and column
is either gray and white.
Does anyone know if there's a way to reverse the relationship, so that
colgroups trump alternate row colors? It isn't absolutely critical, as I
could probably accomplish my goal by simply assigning each cell a class
(e.g. <td class="red">), but I'd prefer to use colgroups for bigger tables.
I posted my JavaScript links below. Thanks.
* * * * *
<script src="http://MySite/js/jquery-1.3.1.min.js";
type="text/javascript"></script>
<script src="http://MySite/js/tablesorter/jquery.tablesorter.js";
type="text/javascript"></script>
<script language="JavaScript" type="text/JavaScript">
 $(document).ready(function()
  {
  $("#myTable").tablesorter({ widgets: ['zebra']} );

$("#triggerMS").click(function(){
 $("#menuMS").show();
 return false;
});
$("#menuMS").click( function(){
 $("#menuMS").hide();
 return true;
});

$("#triggerReg").click(function(){
 $("#menuReg").show();
 return false;
});
$("#menuReg").click( function(){
 $("#menuReg").hide();
 return true;
});

$("#triggerKids").click(function(){
 $("#menuKids").show();
 return false;
});
$("#menuKids").click( function(){
 $("#menuKids").hide();
 return true;
});

$("#triggerLinks").click(function(){
 $("#menuLinks").show();
 return false;
});
$("#menuLinks").click( function(){
 $("#menuLinks").hide();
 return true;
});

$("#triggerBooks").click(function(){
 $("#menuBooks").show();
 return false;
});
$("#menuBooks").click( function(){
 $("#menuBooks").hide();
 return true;
});

  }
 );
</script>
-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org

Reply via email to