This is very useful if you want to put an anchor link in your navigation or if you want to add an anchor link to a Button Element.
Add the following to your website head:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"> </script>
<script type="text/javascript">
//<![CDATA[
/* removing target blank from anchor links */
$(document).ready(function() {
$( "a[href*=#]").attr('target', '_self' );
});
//]]>
</script>