Take an href and add it to another appended element
var $test = jQuery('a.nextProdThumb').each(function(index, value) {
var link = jQuery(this).attr('href');
//jQuery("td.nextAddToCartButton").append('<a href="' + link + '">View Details</a>');
jQuery(this).closest('.nextProductWrapper').find('td.nextAddToCartButton').append('<a href="' + link + '">View Details</a>');
});