jquery get tr with id 99 in javascript

You can achieve this using jQuery's selector syntax combined with the "id" attribute selector:

index.tsx
// With jQuery
var $tr = $('#99');

// With vanilla JavaScript
var tr = document.querySelector('#99');
103 chars
6 lines

The first example uses the jQuery function to select the "tr" element with the "id" attribute equal to "99" and returns a jQuery object containing that element. The second example does the same thing using vanilla JavaScript's querySelector method and returns the raw DOM element.

gistlibby LogSnag