- You can have "NOTE: External link" after every external link.
- You can use JQUERY to automatically add alerts or call another function when pressing the link.
Here are some examples.
You only need to assign class="external" to the external links.
$("a.external").click(function () { alert("Note: You are leaving this website"); });
Another example:
$('a').filter(function() { return this.hostname && this.hostname !== location.hostname; }) .click(function () { var x=window.confirm('You are about to proceed to an offsite link. My site has no control over the content of this site. Click OK to proceed.'); var val = false; if (x) val = true; else val = false; return val; });
- You could do this where JQUERY would go.
External Link Disclaimer
- Updated
Please sign in to leave a comment.