I create a coupons product and want to open 4 tabs with one click, this happens in firefox, but in chrome only 2 links can open and the other two are blocked.
Here is what I tried
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(function() {
$('[data-popup-open]').on('click', function(e) {
window.open('https://www.google.com');
window.open('http://www.facebook.com');
window.open('http://www.stackoverflow.com');
window.open(window.location.href);
});
});
</script>
</head>
<body>
<a class="btn" data-popup-open="popup-1" href="#">Open Popup #1</a>
</body>
</html>
source
share