So, what I want to achieve is that the wrapping link I have to be clickable on all places, instead when the button is clicked don't call the function or click the item
<a href="test.com">
<img />
<title />
<button>
Add to Cart
</button>
</a>
So, what I want to achieve is that the wrapping link I have to be clickable on all places, instead when the button is clicked don't call the function or click the item
<a href="test.com">
<img />
<title />
<button>
Add to Cart
</button>
</a>
First of all, mixing a link and a button isn't a good idea Can I nest a <button> element inside an <a> using HTML5?
Second of all use event.preventDefault()