Page 1 of 1
suggest: about cell class name of table.
Posted: Wed Jun 08, 2022 7:56 am
by ssbbstw
I have a <table> and 3 <tr>.
Each time the <td> content is modified,
The class name of cell is change from 'cell1', 'cell2', 'cell3'.....
I must modify my javascript when publish html every time.
Can you give me a 'class' attribute to set? Thank you!!
Re: suggest: about cell class name of table.
Posted: Wed Jun 08, 2022 8:12 am
by Pablo
The name of the class of a table cell depends on the content of the cell and the context of the table within the page.
For example, if all styles of the cell are the same as the table then no class may be added. The name of the class is dynamically determined each time the page is generated.
Also, there is no guarantee that the cell is always named the same. This may change in future updates.
So, if you use a custom script then it's better to use a different way of querying the cell, for example based on its index.
Re: suggest: about cell class name of table.
Posted: Sat Jun 11, 2022 3:32 am
by ssbbstw
I like use class ex: $('.cell2').html('....');
Re: suggest: about cell class name of table.
Posted: Sat Jun 11, 2022 6:19 am
by Pablo
Sorry, you will have to find any other way. The class name of the cell is not guaranteed to be the same in all cases.