0

I have a select menu, for which I have the following code:

$('#sister-site-menu').change(function(){
  if ($(this).val()) {
    window.open($(this).val(), '_blank');
  }
});

This however causes the popup blocker to be invoked in Chrome. I'm sure I've seen sites do this before, any ideas?

Thanks!

DanH
  • 5,498
  • 4
  • 49
  • 72

1 Answers1

1

You can safely remove the 'blank'-part. Try this:

$('#sister-site-menu').on('change',function(){
  if ($(this).val()) {
    window.open($(this).val());
  }
});

If that does not work, I see no other way around this.

OptimusCrime
  • 14,662
  • 13
  • 58
  • 96