nickostyle,
<a id="link1" href="#">Click me</a>
<div id="content1" style="display: none;">Content should be here!</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('a#link1').click(function (e) {
$(this).toggleClass('active');
$('#content1').toggle();
e.stopPropagation();
});
$('body').click(function () {
var link = $('a#link1');
if (link.hasClass('active')) {
link.click();
}
});
});
</script>