summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-03-24 13:57:07 +0100
committermr <mr@mrautenberg.de>2011-03-24 13:57:07 +0100
commit592f509ec22dd3f742ee530c7b1692b1af05e528 (patch)
tree0322f9332db56a696282cf54c165663de7a3e1b1 /public
parent0ed50191f815fce11816044864a045a31194d8b4 (diff)
external links with rel='external' for w3c compliance
Diffstat (limited to 'public')
-rwxr-xr-xpublic/javascripts/toxcreate.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js
index 3f243fe..d9946c4 100755
--- a/public/javascripts/toxcreate.js
+++ b/public/javascripts/toxcreate.js
@@ -226,3 +226,15 @@ jQuery.fn.deleteModel = function(type, options) {
return false;
});
};
+
+$(document).ready(function() {
+ $('A[rel="external"]').each(function() {
+ $(this).attr('alt', 'Link opens in new window.');
+ $(this).attr('title', 'Link opens in new window.');
+ });
+ $('A[rel="external"]').click(function() {
+ window.open($(this).attr('href'));
+ return false;
+ });
+});
+