nlm-notifyExternal Demonstration

This page demonstrates usage of the nlm-notifyExternal Javascript library. See the documentation for details.

Default

// Usual behavior $(document).ready(function() {nlm.notifyExternal.setNotification()});

Custom 1

function custom1() { var sites = nlm.notifyExternal.defaultSites(); sites.push('google.com'); nlm.notifyExternal.setNotification($('#custom1'), {message : 'Altered message', sites : sites} ).css('background-color', '#ddd'); }

Custom 2

function custom2() { var sites = nlm.notifyExternal.defaultSites(); sites.push(new RegExp('(www\\.)?google\\.com')); nlm.notifyExternal.setNotification($('#custom2'), {sites : sites} ).css('background-color', '#ddd'); }

Custom 3

Loading data, please wait.

function custom3() { setTimeout(function() { $('#custom3content').load('nlm-notifyExternal-demo.html #default > ul', function() { nlm.notifyExternal.setNotification($(this)).css('background-color', '#abc'); }); }, (3*1000)); }