Articles Archive for 12 January 2010
Blogger Hacking »
In this small tutorial I’ll explain how to open all external links in new window automatically. There are many ways for it but now I’ll only explain two of them – with and without jQuery. So let’s start.
Tutorial First – With jQuery:
We are going to make sure you have jQuery active on your site, you can do this easily in WordPress, since it’s bundled with the latest installations. Use this code in your header: <?php wp_enqueue_script(‘jquery’); ?> then, below the wp_head add the following:
<script type="text/javacript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
//external attribute
…
