Q:

How to determine type of Html table column

I have a table with 3 columns.    

is hidden and is containing "id" of selected row  
is containing "product" name    
is containing an yes/no  denoting product is present or not

On Row click push the details to an array as     
$("#Product_grid_wrapper table tr").click(function () {

        //empty the array
        selectedProduct = [];

        $('#Product_grid_wrapper table tr').removeClass("row_selected");

        $(this).find('td').each(function () {
            selectedProduct.push($(this).text());
        });

        $(this).addClass("row_selected");
    });

But I was asked to change the "yes/no" with an image.I did it perfectly. Now the third column is containing Image tag , with image setting at runtime using aspx  
but the code 
 selectedProduct.push($(this).text());    

will fail for 3rd column as it is containing the image.How to handle this case?  
I am able to give a class="yes/no" to Image tag from Server.But how can I read this value as per above code.can I find the type of content of table col and use appropriate function  
 $(this).find('td').each(function () {
            //if(type of content of td is image tag)   
            {
               selectedProduct.push($(this).html());
               //will extract "class    " of image tag to get "yes/no" value
            }  
            else{
                 selectedProduct.push($(this).text());
           }
        });

A:

If you've added a class yes/no to the image, you could try this: 
if($(this).find('img').length == 1) {
    selectedProduct.push($(this).find('img').attr('class'));
}

