I want to open links marked with class=“external” in a new window, how do I do that?
Presumably you want to set the ‘target’ attribute in a doctype that doesn’t allow it. Try this anywhere below the last link:
<script type='text/javascript'>
for( var i = 0, dl = document.links; dl[ i ]; i++ )
if( /\\bexternal\\b/.test( dl[ i ].className ) )
dl[ i ].target = '_blank';
</script>
Thanks