Check-in Number:
|
38 | |
Date: |
2008-Feb-04 21:36:26 (local)
2008-Feb-04 20:36:26 (UTC) |
User: | rse |
Branch: | |
Comment: |
fix extlink plugin in case of a <a> without a 'href' attribute
|
Tickets: |
|
Inspections: |
|
Files: |
|
Modified: jquery/jquery.extlink.js
===================================================================
--- jquery/jquery.extlink.js 2007-04-13 17:18:08 UTC (rev 37)
+++ jquery/jquery.extlink.js 2008-02-04 20:36:26 UTC (rev 38)
@@ -15,7 +15,11 @@
var site = String(document.location)
.replace(/^(https?:\/\/[^:\/]+).*$/, "$1");
$("a", this).filter(function (i) {
- return ($(this).attr("href").match(RegExp("^("+site+"|(https?:)?/)")) != null);
+ return (
+ $(this).attr("href")
+ ? ($(this).attr("href").match(RegExp("^("+site+"|(https?:)?/)")) != null)
+ : false
+ );
}).each(function () {
$(this)
.css("backgroundImage", "url('jquery.extlink.d/extlink-" + color + ".gif')")