Outbound Links

Click to see demonstration of LeaveNotice.

LeaveNotice Examples

1. Default Implementation (no options set)

Example Link

$('a.ex1').leaveNotice();

2. Standard Implementation (only siteName set)

Example Link

$('a.ex2').leaveNotice({ siteName:"NIST LeaveNotice Test Page" });

3. Custom Exit Message

Example Link

$('a.ex3').leaveNotice({ siteName:'NIST LeaveNotice Test Page', exitMessage:"<h1>Say goodbye to<br/> {SITENAME}!</h1><p>Thanks. Shut the door behind you!</p>" });

4. Custom Exit Message and Custom preLinkMessage

Example Link

$('a.ex4').leaveNotice({ siteName:"NIST LeaveNotice Test Page", exitMessage:"<h3>Say goodbye to {SITENAME}!</h3><p>Thanks. Shut the door behind you!</p>", preLinkMessage:"<hr/><p>Have fun at:<br/><strong>{URL}</strong></p><hr/>" });

5. No Timer Set (User has to specifically click the link)

Example Link

$('a.ex5').leaveNotice({ siteName:"NIST LeaveNotice Test Page", timeOut:0 });

6. Open Link in New Window

Example Link

$('a.ex6').leaveNotice({ siteName:"NIST LeaveNotice Test Page", newWindow:true });

7. Custom IDs elements (and custom styles)

Example Link

Javscript

$('a.ex7').leaveNotice({ siteName:"NIST LeaveNotice Test Page", exitMessage:"<h3>Say goodbye to {SITENAME}!</h3><p>Thanks. Shut the door behind you!</p>", preLinkMessage:"<hr/><p>Have fun at:<br/><strong>{URL}</strong></p><hr/>", overlayId:"custom-blackout", messageBoxId:"custom-messageBox", messageBoxHolder:"custom-messageHolder", overlayAlpha:0.6 });

CSS

#custom-blackout {position:fixed; top:0; left:0; width:100%; height:100%; background-color:#514004;} #custom-messageHolder {position:fixed; top:200px; left:0; width:100%;} #custom-messageBox {width:400px; margin:0 auto; padding:120px 50px 20px 50px; background:#333 url(img/custom-msg-box-bg.png) no-repeat top center; color:#fff; text-align:center; border:5px solid #F8DA07; -moz-border-radius:15px; -webkit-border-radius:15px;} #custom-messageBox * {color:#fff;} #custom-messageBox hr {border-color:#666;} #custom-messageBox a#ln-cancelLink {background-color:#666; color:#333;}

Top