Answer the question
In order to leave comments, you need to log in
Selecting the first checkbox?
There is this code:
<_tr class="table_rows"><br/>
<br/>
<_td><_input name="del[{$item->id}]" type="checkbox" id="del[{$item->id}]" value="1">
$('.table_rows').click(function() {<br/>
$(this).toggleClass("selects");<br/>
<br/>
if( $(this).find("input").is(":checked"))<br/>
{<br/>
$(this).find("input").removeAttr("checked");<br/>
} else {<br/>
$(this).find("input").attr("checked","checked");<br/>
}<br/>
<br/>
}); <br/>
Answer the question
In order to leave comments, you need to log in
Maybe you forgot to post?
Something I didn't understand your question.
sorry for this gibberish. I just forget that html tags work here. And so, the final answer is:
<_input type="checkbox" id="your_ID" value="1"/>
<_label for="your_ID">your text for your checkbox<_/label>
I don't understand the question, but will any of this work? )
jsfiddle.net/4k6PA/7/
Events in jquery are fired during the bubbling (except for the focus event and possibly others for certain browsers, since IE doesn't support "capture" in its <9 version).
Based on this, you can activate the checkbox during the click on the line and a second time if the event pops up before the link / text field.
Well, delegating makes sense to hang such an event on the entire table. And next time, format your question normally, as well as learn js, because there is nothing complicated / interesting in the sim :).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question