I had a look through others similar questions and I haven't got a clue why mine solution doesn't work. Maybe you can spot something I'm missing. What I'm trying to do is trigger a click while clicking on div with id badge
HTML
<div id="call-out">
<div id="badge">Brochure</div>
<p>Add <a href="http://www.google.com" target="_blank">test</a> content</p>
</div>
jQuery:
$('#badge').on('click', function(e) {
e.stopImmediatePropagation();
if (! $(e.target).is('a')) {
$(this).parent('div').find("a").trigger('click');
}
});
Any suggestions appreciated. Here is my test: http://jsfiddle.net/m89wa/2/
window.open("")or do what @jandro5 suggests below.