I am encountering a strange issue with jQuery. I am generating a table with row with names:
<tr name='table-row-#'><td>#</td></tr>
where # is an index number (1 to 4 in this case) for as many rows as I fetch from my database [PHP]. I have even commented out and stripped down everything else to replicate the line above.
Consider this:
var keywords = $("[name^=table-row-]"); // Fetch all rows starting with 'table-row-'
alert(keywords.length); // alerts '4' because 4 objects were found and printed whose name start with the string 'table-row-'
alert(keywords[0].name); // alerts 'undefined', which contradicts the first line
Any idea how this makes sense?