Tye Lucas Tye Lucas - 2 months ago 5x
jQuery Question

How to remove an element from a <tr>

Here is the code:

<tr class="active" aria-selected="true" data-row-id="3">

I am using: $("tr").removeClass("active"); to remove the "active" class which works perfectly but I also need to set aria-selected="true" to "false", this is for a data-table selection in a modal. Any help will be most helpful,

Thank you!


Use jQuery attr() method to update element attribute.