Answer the question
In order to leave comments, you need to log in
How to come up with an algorithm for changing the width of the columns (columns) of a table?
Hello!
You need to make sure that users have the ability to change the width of the table columns.
I plan to do this in pure JS (well, or with jQuery, but I would not want to include it for the sake of it) using Drag and Drop .
However, in the case of table columns, it is not clear which element should be clicked and held down by the user . After all, this is usually a border, but it is not an element in itself.
The second interesting point follows from the presentation of the table as a code: each line begins with <tr>
, and already it contains an element <td>
whose width needs to be changed. In the cycle find everything <tr>
, find the necessary<td>
By serial number and after that change? Is that how it's usually done? Performance in this case does not suffer?
PS. I don't want to use plugins because: a) the project is commercial, licenses impose their limitations; b) as a rule, they have a lot of extra functions - sorting, moving lines, etc., but I don't need it.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question