using each() from a tr, get the 1st child's alt text
Hey guys, first post here!
Javascript/PHP developer working my way through jQuery, now wondering how I lived without it.
I'm trying to get append() another column to each <tr> in a table. So I need somethings to do this append, which is very easy.
The code I'm struggling with is this:
- $(".my_tr").each(function(index,value){
// get the group ID and index
var grpId = $(".my_first_td").get(index).attr('id');
It says attr() is not a function.
I'm using $.dump() and without the attr() I do get the <td> elements (the first <td> in every row in my case)
How do you get attributes from an object?
I've also found out that "value" and "this" are equal to the <tr> object, which I can use to get the first_child... but even then attr() didn't work.
Thanks for any help. I hope I made myself clear.
Dan