2
I want to study more about <table>
<tr>
<td>
etc, to optimize my projects.
Example: I have 4 <tr>
with 2 <td>
each, when applying a formula in jQuery for example, add the first <td>
with the second <td>
of each <tr>
using little formula. I want to know how to reference the first with the second of each line.
Any idea?
The most appropriate way to do it depends on the goal, as well as the html structure you are using. Try to be more specific at these two points
– Isac
My only goal is to study the structure, but I don’t know why Google for this study.
– ThiagoKoller
It wasn’t very clear. You want the two tds of each line to go?
– Sam
If each line has 2 td, the whole table will disappear.
– Sam
I subscribe to what @Dvd said, it’s not really clear. What I meant by this last statement "I want to know how to reference the first with the second of each line" ?
– Isac
I could not be clear in the question, excuse me, the objective is to study the referencing of the structure.. to optimize the projects in jQuery, the sum is just an example for the case I have 150 <tr> and 20 <td> in each <tr>, ai imagine the size of jQuery if you are going to do sum by sum in each <tr>, understand?
– ThiagoKoller
the idea is so.. jQuery -> add the first <td> with the second <td> of each <tr> and return the result in the third <td> of each <tr> ===>> remembering, this is only one example
– ThiagoKoller
Vc says adding numerical values from one td to another?
– Sam
the goal I think was clear, only the study of the structure, how to navigate through the html Tables and make references by <tr> and <td>... I can’t find any of this in google
– ThiagoKoller
not dvd, I want to know how to make jQuery understand what is the first <td> of each <tr>.. the sum is just an example to try to make the question clearer (unsuccessfully) kk...
– ThiagoKoller
The first
<td>
of each<tr>
is given by$("tr").children().first()
. Is that what you wanted to know? Or even everything on the dial, with$("tr td:first-child")
. In the latter case it is purely CSS Jquery is not even relevant– Isac
that! , that’s the idea, has some documentation, or some specific name so that I can delve into this reference??
– ThiagoKoller