How can I avoid getting pop-up blocked? Whenever I click the button, the notification pops up and says that it will be redirected like I said. But chrome says it is unable to open the new tab because it has pop-up blocked.
$(function () {
$('#clickBtn').on('click', function () {
new Noty({
type: 'success',
layout: 'topRight',
timeout: timeout,
text: '<p style="text-align: center">Redirecting in 5
seconds</p>'
}).show();
var url = 'https://google.com',
delay = 5000; // Milliseconds: 1sec x 1000
setTimeout(function () {
window.open(url, '_blank');
}, delay);
});