id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,blocking,blockedby
8586,"contents().hide() results in javascript error, does not hide text nodes",stevensalter42@…,stevensalter42@hotmail.com,"If you have a table cell with whitespace or text, and you try to do:
 
{{{
 $cell.contents().hide();
}}}

you will get a Javascript error:
  
{{{
Cannot set property 'display' of undefined
}}}

The reason is this loop on line 7486 of jquery-1.5.1.js:

{{{
  for ( i = 0; i < j; i++ ) {
    this[i].style.display = ""none"";
  }
}}}

Incidentally, I tried simply adding a check to avoid the error:
  
{{{
for ( i = 0; i < j; i++ ) {
    if (this[i] != undefined && this[i].style != undefined)
      this[i].style.display = ""none"";
}
}}}

This prevents the error from occurring, however, it doesn't solve the problem, since the text node is not hidden.",bug,closed,undecided,1.next,effects,1.5.1,worksforme,,,,
