echoing dynamically generated link from different element
I'm looking to test the CTA button on our category page. The page has a series of dynamically-generated product tiles that currently have an Add to Cart button, but I want to change this to a View Details button. The product thumbnails are linked to the product detail page, so I'd like to update the Add to Cart button to use this same link. Is this possible?
Solved! Go to Solution.
To get you started, here is a sample code:
var dynamicLink = $("firstElement").attr("href");
The first line saves the link from the first element and the 2nd line changes the link source for the other element.