I used this code inside of a javascript file to switch out an 'add to cart' button:
the original 'add to cart' button that is in the htm file works, but when it is switched out with the one above, it does not work! what am I doing wrong? it's the same code!
Code:
var addDisplay = document.getElementById('cart-add');
addDisplay.innerHTML = "<a class='item_add' href='javascript:;'><img src='images/shop/cart-add.jpg' width='118' height='26' border='0'></a>";
Comment