Possible Duplicates:
Is there an “exists” function for jQuery
jQuery determining if element exists on page
if(tr)
is returning true when tr is not an element, how do I check whether it's an element that exists?
var tr = $('#parts-table .no-data').parent();
$('.delete', row).bind('click', function (e) {
that.delete(e.currentTarget);
});
console.log(tr);
if (tr) //returns true when it shouldn't