This page demonstrates usage of the nlm-notifyExternal
Javascript library. See the
documentation for details.
// Usual behavior $(document).ready(function() {nlm.notifyExternal.setNotification()});
function custom1() { var sites = nlm.notifyExternal.defaultSites(); sites.push('google.com'); nlm.notifyExternal.setNotification($('#custom1'), {message : 'Altered message', sites : sites} ).css('background-color', '#ddd'); }
function custom2() { var sites = nlm.notifyExternal.defaultSites(); sites.push(new RegExp('(www\\.)?google\\.com')); nlm.notifyExternal.setNotification($('#custom2'), {sites : sites} ).css('background-color', '#ddd'); }
function custom3() { setTimeout(function() { $('#custom3content').load('nlm-notifyExternal-demo.html #default > ul', function() { nlm.notifyExternal.setNotification($(this)).css('background-color', '#abc'); }); }, (3*1000)); }