0
I have the image attached when I click on the checkbox, I can give Highlight on that line via the following code :
$("input[type='checkbox']").change(function (e) {
if ($(this).is(":checked")) {
$(this).closest('tr').addClass("highlight_row");
} else {
$(this).closest('tr').removeClass("highlight_row");
}
});
Pórem is tending to make that when I click two input fields that I have in the end win the REQUIRED property. It must be something simple, but I’m skating on it. That’s a line from where I can get 'n' lines.
Edit your question and include table html with inputs
– Caique Romero
you can give a find on the element since it has the
$(this)
, would look something like this:$(this).parent().find().('.classe_do_input').attr('required', true);
with theparent
you will rise to the level of the line and after that search the element with the class you need.– arllondias
@arllondias I think using the
attr
will not give, use the.prop("disabled", true)
may result in alternative– I_like_trains