diff options
author | mr <mr@mrautenberg.de> | 2011-03-24 13:57:07 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-03-24 13:57:07 +0100 |
commit | 592f509ec22dd3f742ee530c7b1692b1af05e528 (patch) | |
tree | 0322f9332db56a696282cf54c165663de7a3e1b1 /public | |
parent | 0ed50191f815fce11816044864a045a31194d8b4 (diff) |
external links with rel='external' for w3c compliance
Diffstat (limited to 'public')
-rwxr-xr-x | public/javascripts/toxcreate.js | 12 |
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; + }); +}); + |