Prototype to jQuery

var reportId = event.findElement(‘tr’).identify().match(/\d+/);

var reportId = $(this).closest(‘tr’).attr(‘id’).is(/\d+/);

You can see what I have above. However, in prototype reportId = the closest tr element with an id of digits. In jQuery it returns false.

I realize the .is() returns true or false, my questions is… what can I do to replicate the what Prototype performs.


There’s something else here that’s going to prevent a solution from properly being applied, and that is that it’s not allowed for any identifier to start with a number.

Well the prototype code works. I am converting all prototype to jquery. I think I phrased that wrong, its not looking for an id of digits, it is looking for the closest id with digits, not necessarily all digits.

Nevermind. I figured it out. I should have just left .match(/\d+/) and not changed it.