I am trying to find a cell in a table that has a class of 'empty', i am then using a bit of code to find the id(cell number) so i can the find out what cells are next too it.
just too see if it works, i am trying:
console.log($('.empty').attr('id'));
but Firebug just returns 'undefined'
each cell has the class of 'box' and only one has empty as well so 'box empty'.
Any asssitance would be much appreciated.
$('.empty')may return array of DOM elements. In that case, array itself does not have attribute