handle anchors that are not hrefs

This commit is contained in:
sanj 2010-11-14 00:44:32 +05:30
parent 9a6e5a5b8b
commit 4471b2ad6e

View File

@ -5,6 +5,9 @@
$(function() { $(function() {
$("a").each(function() { $("a").each(function() {
var that = this; var that = this;
if (!$(this).hasAttr("href")) {
return;
}
$(this).attr("target", "_blank"); $(this).attr("target", "_blank");
var link = $(this).attr("href"); var link = $(this).attr("href");
if (link.indexOf(PADMA_URL) != -1) { if (link.indexOf(PADMA_URL) != -1) {