Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to change a Checkbox attribute on click of parent <tr>
    primarykey
    data
    text
    <p>I need small suggestion from you.</p> <p>Onclick of the checkbox attribute inside that should be changed.There is also a inside the </p> <p>HTML Code: </p> <pre><code> &lt;table&gt; &lt;tr&gt; &lt;td class="answer"&gt;&lt;input tabindex="4" type="checkbox" name="Dum1_4" id="Dum1_4" value="1"/&gt;&lt;/td&gt; &lt;td class="answerlabel"&gt;&lt;label for="Dum1_4" id="Dum1_4_label"&gt;&lt;table class="sample"&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="/ThumbsV2/2200000999-f.png"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Product 4&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Product Description 4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Price 4&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="answer"&gt;&lt;input tabindex="5" type="checkbox" name="Dum1_5" id="Dum1_5" value="1"/&gt;&lt;/td&gt; &lt;td class="answerlabel"&gt;&lt;label for="Dum1_5" id="Dum1_5_label"&gt;&lt;table class="sample"&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="/ThumbsV2/2200001080-f.png"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Product 5&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Product Description 5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Price 5&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Here is my code:</p> <pre><code>$('.sample').click(function() { row =$this.parents("td"); row.siblings().find("input:checkbox").attr("checked","checked" ); } }); }); </code></pre> <p>Please someone help me!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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