The jQuery feature does not work on Chrome on Mac, but it works on Chrome on Win 7 and all other browsers

Link to this page: http://www.ivault.sg/nproduct.php?pid=116&cat=2

Selecting an option from the drop-down list on the side should change the href to Add to Cart.

However, this does not happen specifically for Chrome on Mac computers, but it works in all other browsers, even on Chrome on Windows.

+4
source share
1 answer

Instead of the click event, use change, as in

$("#productOptions").change(function(){ var id=$(this).attr("value"); if (id != "") { $("#productAddToCart").attr("href","addtocart.php?code="+id); } }); 
+3
source

Source: https://habr.com/ru/post/1383422/


All Articles