Thanks for the solutions, I have figured out solutions like yours, but I
tought that may exists less-code solutions, so I opened this thread.
Thanks anyway, great solutions.
On Tue, Oct 20, 2009 at 00:18, Charlie wrote:
> I try to learn as much as I can from this sort of exercise.
>
> I made a
I try to learn as much as I can from this sort of exercise.
I made a couple of revisions to previously untested version, went back
and made a couple of syntax and code fixes to previously untested
suggestion
I only submit this because it works on a limited sized table with
simple names, not
Bi Jing wrote:
I like this issue and following is my draft implement, its
working on IE/FF, hope it helps
Firstly, I suggest adding a class to COSTUMER column that gonna making
things easier.
HTML sample code:
1
dd
cc
ss
ss
I like this issue and following is my draft implement, its working on IE/FF,
hope it helps
Firstly, I suggest adding a class to COSTUMER column that gonna making
things easier.
HTML sample code:
1
dd
cc
ss
ss
2
22
33
my starting thought would be use the name as a class, assign a color to
class perhaps from an array of colors so you could have 10 colors and
use them in order for first ten unique names, then repeat for next 10
unique names
use a length ( or size) test to see if that class already exists, if
Put together a hashtable of colors based on the customer name.
Something like this (untested):
var hash = {};
$('#tableid tr').each(function(i){
var tr = $(this);
var customer = $.trim(tr.children('td:eq(1)').html());
var color = hash[customer];
if (!color)
{
has
6 matches
Mail list logo