You can use the :eq selector, for example:
$("td:eq(2)").css("color", "red"); // gets the third td element
Or the eq(int) function:
$("td").eq(2).css("color", "red");
Also, remember that the indexes are zero-based.
More Related Contents:
- Difference between .on(‘click’) vs .click()
- jQuery how to find an element based on a data-attribute value?
- How do you select a particular option in a SELECT element in jQuery?
- val() vs. text() for textarea
- $(window).width() not the same as media query
- Can you detect “dragging” in jQuery?
- How to get jQuery to wait until an effect is finished?
- Adding data attribute to DOM
- How can I show and hide elements based on selected option with jQuery?
- Update select2 data without rebuilding the control
- How to stay on current window when the link opens in new tab?
- How can I display a tooltip on an HTML “option” tag?
- Dealing with line Breaks on contentEditable DIV
- Trouble with jQuery Dialog and Datepicker plugins
- What’s the difference between keyup, keydown, keypress and input events?
- How can I convert a DOM element to a jQuery element?
- jQuery scrollTop not working in Chrome but working in Firefox
- jQuery when each is completed, trigger function
- Write Content To New Window with JQuery
- JSON: How do I make cross-domain JSON call
- finding the type of an element using jQuery
- Populate Select box options on click with Javascript/Jquery with Json data
- Modify a svg file using jQuery
- How do I reset a jquery-chosen select option with jQuery?
- Use jQuery to Detect Container Overflow?
- JQuery.validate – one rule on blur only; the rest should be normal?
- While variable is not defined – wait
- Get the selected option id with jQuery
- jQuery css gradient
- What happens when no response is received for a request? I’m seeing retries