Using JQuery to insert new cells in a table row?

Posted by Michael Smith on Stack Overflow See other posts from Stack Overflow or by Michael Smith
Published on 2010-05-16T00:38:11Z Indexed on 2010/05/16 0:40 UTC
Read the original article Hit count: 309

Filed under:
|
|

I know that JQuery is a very powerful library and was just wondering if it had the following capability that I really need.

Lets say I need to insert new cells into a table row, I know how to do this basic task, but I need to insert my cells in a highly unusual way due to some of the requirements that are needed for the new cells.

I need to be able to insert cells a certain distance into the row, For example, if a row was 1000pixels wide, is there a feature in JQuery that would allow me to insert the cell 250pixels into the row and have a cell width of 50pixels and insert another cell 500pixels into the row with a cell width of 100pixels. I know how to set a cells width using JQuery, just not distance into a row.

The values wont ever be the exact same as above though because they are actually read from a database, so for example, one cell would have the following values:

CELL_01
$start=100;
$finish=150;

the above would mean a new cell is needed that needs to be inserted 100pixels into the row and has a width of 50pixels, I just cant seem to find a way to implement this feature into my application.

How could I accomplish this task?

Sorry for such a strange question, but i just cant seem to get this working.
Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript