Hi everybody,
I need to create tables which have a class attached to each even table row (this is needed to color each second row in an other color).
The user should edit the design itself or attach a class attribute on himself.
So the table creation should generate:
<table class="someclass">
<tr><td>...</td></tr>
<tr class="even"><td>...</td></tr>
<tr><td>...</td></tr>
<tr class="even"><td>...</td></tr>
</table>
Also when the user adds an row later (by right-clicking on the table and selecting "insert row") in the already generated table the class="even" attributes should be changed correctly.
Any idea on this?
I saw in the fcktablehandler.js the FCKTableHandler.InsertRow = function() definition.
But I am not sure how to add there this functionality.
Best regards
Matthias
I need to create tables which have a class attached to each even table row (this is needed to color each second row in an other color).
The user should edit the design itself or attach a class attribute on himself.
So the table creation should generate:
<table class="someclass">
<tr><td>...</td></tr>
<tr class="even"><td>...</td></tr>
<tr><td>...</td></tr>
<tr class="even"><td>...</td></tr>
</table>
Also when the user adds an row later (by right-clicking on the table and selecting "insert row") in the already generated table the class="even" attributes should be changed correctly.
Any idea on this?
I saw in the fcktablehandler.js the FCKTableHandler.InsertRow = function() definition.
But I am not sure how to add there this functionality.
Best regards
Matthias
Re: Creating table rows with class attribute odd/even
I meant the user should NOT edit the design itself or attach a class attribute on himself.