I am creating a coupons product and would want to open 4 tabs at one button click, this is happening in firefox, but in chrome only 2 links are able to open and the rest two gets blocked.
Here is what I had 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>