Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery. How to select some cells at each row?
    primarykey
    data
    text
    <p>I'm a bit stuck trying to resolve this problem. I need get content of a few cells, and after this do update inner text of this cells</p> <p>For example, I need to get values of cells with class = 2 and class = 4 in each row, and after this, update their inner text</p> <p>I tried to do it by this code:</p> <pre><code>$(element).each(function () { // code code code }); </code></pre> <p>But isn't really something, what i need, because this code just get each element at each row, but i need get a few elements at each row at one time</p> <p>It's should be lookin something like :</p> <ol> <li>get row.</li> <li>get elements with class = 1 and class = 2 at current row</li> <li>send their content to script</li> <li>update content of cells</li> <li>get next row</li> <li>etc</li> </ol> <p>Here is example table:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td class="1"&gt; Cell One &lt;/td&gt; &lt;td class="2"&gt; Cell Two &lt;/td&gt; &lt;td class="3"&gt; Cell Three &lt;/td&gt; &lt;td class="4"&gt; Cell Four &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="1"&gt; Also one Cell One &lt;/td&gt; &lt;td class="2"&gt; Also one Cell Two &lt;/td&gt; &lt;td class="3"&gt; Also one Cell Three &lt;/td&gt; &lt;td class="4"&gt; Also one Cell Four &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>**</p> <blockquote> <p>And also. .</p> </blockquote> <p>**</p> <blockquote> <p>I need send Ajax Query, for each row in table, with inner text of 2 cells of current row ajax.php?id=column1&amp;val=column2</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload