I've been trying for days to figure this out and need some help.
On my site, every users shopping cart will have different items in it, but if a specific item is in the cart i want to the "Remove Item" button to be copied to an additional location.
<!-- Here's how Business Catalyst outputs the buttons -->
<div class="cart-item product-remove" style="border:solid 1px black;" >
<div class="productitemcell"><a href="#" onclick="UpdateItemQuantity(0,324897,282161,9383682,336573,'','US');return false;">Remove Item</a></div>
<div class="productitemcell"><a href="#" onclick="UpdateItemQuantity(0,324897,282161,9383705,336574,'','US');return false;">Remove Item</a></div>
<!--the div below contains the button (anchor tag) I want to copy (It will move around the .product-remove div)-->
<div class="productitemcell"><a href="#" onclick="UpdateItemQuantity(0,324897,282161,9383678,336585,'','US');return false;">Remove Item</a></div>
</div>
<div id="sendLinkHere" style="border: 1px solid blue; width: 100%; height:50px;">
<!-- I want the a tag containing "9383678" copied here -->
</div>
Here's the javascript I have. I know it's not a lot but it's all i've got.
var divsOfA = document.getElementsByClassName("productitemcell");
console.log($.inArray("9383678",divsOfA));