jQuery auto click on a link

Ok, so I searched all over with no answer.
Can someone explain why

does not work with .trigger('click')

<a id="openNew" href="http://www.example.org">Click me</a>

<script type='text/javascript'>
    $  (window).load(function(){
        $  ('#openNew').addClass("external").attr({ target: "_blank", href: 'http://www.google.com' }).trigger('click');
    });
</script>

and it does not work with .click()

<script type='text/javascript'>
    $  (window).load(function(){
        $  ('#openNew').addClass("external").attr({ target: "_blank", href: 'http://www.google.com' }).click();
    });
</script>

Does not click the link whatever I do. It only works if I click it. How can I make it auto click?
Working on this for about 1 hour and is driving me crazy, I know I’m must be doing something stupid.

JsFiddle for your convenience

newest questions tagged jquery – Stack Overflow

Tags: , , ,

About Admin