I've used window.location (.assign, .replace, .href) to redirect to a page product on click. But for some reason it automatically changes some of href links.
For example: previous href="commercial/fonts/fonts.min.css" is now href="product/commercial/fonts/fonts.min.css".
previous HTML file
<link rel="stylesheet" type="text/css" href="commercial/fonts/fonts.min.css" />
After this click event triggers
$('.productImage').on('click', function(){
var product_id = $(this).data('id');
window.location.assign("/product/"+product_id);
});
New HTML
<link rel="stylesheet" type="text/css" href="product/commercial/fonts/fonts.min.css" />
Product is automatically to the href. This happens with some other files as well. In case of img src as well