Hi,
I am trying to find how to open products from collection page in new browser tab only in Desktop. I want the link to open in the same tab for Mobile
Solved! Go to the solution
This is an accepted solution.
Go to the Assets > theme.js file and add following code at the end of file:
$(function(){
var productURLs = $('a[href*="/products/"]');
if($(window).width() > 768){
productURLs.attr("target", "_blank");
}
});
Cheers,
Tejas
User | Count |
---|---|
28 | |
18 | |
17 | |
16 | |
10 |