theonlychase
7/24/2017 - 11:00 PM

Take an href and add it to another appended element

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>');
    });