0

I can access the row with:

$('#records tbody tr')[i]

But the object returned does not have a .css property. Accessing

$('#records tbody tr').val(i)

returns all the rows in the table, which is not what I want, but it does have the .css property.

How can I access a specific index i of my table and change its css?

2 Answers 2

2

You can use eq:

$('#records tbody tr:eq(0)').css('color','red');
Sign up to request clarification or add additional context in comments.

Comments

0

You can use :first selector:

 $('#records tbody tr:first').css('color','red');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.