jQuery checking the length of array before each? -
quick question, need if statement .length below?
var $colspans = $("td[colspan='0']"); if($colspans.length){ $colspans.each(function(){
no, since length 0 ans it's not $colspans null, you're not in danger of trying call on nothing. won't iterate because there's nothing to iterate over.
Comments
Post a Comment