From 4471b2ad6e8bf9f4b619c33c3cfa76bd60ea0f87 Mon Sep 17 00:00:00 2001 From: sanj Date: Sun, 14 Nov 2010 00:44:32 +0530 Subject: [PATCH] handle anchors that are not hrefs --- padma.links.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/padma.links.js b/padma.links.js index 918f9a1..192f27b 100644 --- a/padma.links.js +++ b/padma.links.js @@ -5,6 +5,9 @@ $(function() { $("a").each(function() { var that = this; + if (!$(this).hasAttr("href")) { + return; + } $(this).attr("target", "_blank"); var link = $(this).attr("href"); if (link.indexOf(PADMA_URL) != -1) {