Answer the question
In order to leave comments, you need to log in
Multiple windows on 1 click in Chrome, JS?
There is a code that, when clicked, searches in a block with links, 3 pieces by class and should launch 3 at once in a new tab (for ease of work in the site admin), but at the moment only the first one is launched. Doesn't work in chrome, does anyone know how to make it work? Thank you!
(works fine in firefox but not chrome)
https://jsfiddle.net/jrc5ue5v/5/
jQuery(function($){
$(document).ready(function(){
$("a.bulk_action_link").click(function(event) {
var href1 = $(this).closest('.links_wrap').find('.link1').attr('href');
var href2 = $(this).closest('.links_wrap').find('.link2').attr('href');
var href3 = $(this).closest('.links_wrap').find('.link3').attr('href');
window.open(href1, 'bulk_' + Math.random());
window.open(href2, 'bulk_' + Math.random());
window.open(href3, 'bulk_' + Math.random());
});
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question