wrdrd / docs

WRD R&D Documentation – https://wrdrd.github.io/docs/
https://wrdrd.github.io/docs/
9 stars 1 forks source link

ENH: Open external links in a new tab (^http) #1

Closed westurner closed 9 years ago

westurner commented 9 years ago

e.g. from https://github.com/westurner/redem/blob/master/redem/templates/redem_summary.jinja2#L156 :

{% block extrajs %}
<script type="text/javascript">
    $(document).ready(function() {
        $("a[href^='http']").attr('target','_blank');
    });
</script>
{% endblock extrajs %}
westurner commented 9 years ago

This is mostly useful for documentation with many outbound links.

ENH: For more precise jquery element selection, it might be helpful to add: