Crossrider

Developer Center
  • Overview
  • Docs
  • Demos
  • Plugin Library
  • Q&A
  • Screencasts
My Extensions
Login
Developer Center
  • Overview
  • Demos
  • Plugin Library
  • Docs
  • Q&A
  • Screencasts
Notifications Plugin
Plugin_notifications
Crossrider Notifications are customizable messages that let you communicate directly with your users wherever they are on the web. This plugin lets you dynamically customize notifications based on your own specifications.
You can customize any aspect of the notification, such as:
  • Theme and color
  • Notification size and icon
  • Title & Destination URL
  • Listen to all notification events (display, click, hover, close, fade)
  • Set notification frequency
  • and much more...
// Example Code:

// This API allows you to dynamically create Crossrider notifications

// Show a noticiation: (You can customize it with the following params)

appAPI.notifier.show({
 'name':'my-notification-name', // Pick a distinctive name. it will not be displayed for the users but used by the system for identification.
 'title':'Notification Title', // Notification title [optional]
 'body':'<span style="font-weight:bold;color:red;">Hello :)</span>', // Notification body - supports HTML.
 'link':'http://mysite.com/welcome', // Notification target link. Will be opened when user clicks the notification
 'theme':'default', // Notification theme: "default", "facebook", "grey", "cyan", "orange", "lime", "navy", "dark-grey", "light-grey", "light-cyan", "peach", "light-green", "white-black", "white-blue", "white-darkred", "white-lime"
 'position':'top-right', // Notification position: "top-right", "top-left", "bottom-left", "bottom-right"
 'icon':'http://mysite.com/img.png', // Notification icon url [optional]
 'close':true, // Show close [X] icon
 'sticky':true, // If you set this to true the notification will not fade until the user clicks or closes it
 'fadeAfter':5, // Fade after X seconds (default 5 seconds) - valid only if sticky:false
 'width':'400px', // Notification width (default 275)
 'closeWhenClicked':true // Notification closes right after user click (default true)
});

// Nnotification events:
// You can listen to all notification events (display, click, hover, close, fade) 
// All events gets a data object as a parameter

// Notification display event - fires when the notification is displayed to the user
appAPI.notifier.events.add('display', function (data) {
  alert(data.name);
});

// Notification click event - fires when the user clicks the notification
var clickCallback = function (data) {
  alert(data.name);
};
appAPI.notifier.events.add('click', clickCallback);

// Notification hover event - fires when the user hovers the notification for the first time
appAPI.notifier.events.add('hover', function (data) {
  alert(data.name);
});

// Notification close event - fires when the user has clicked the close [X] button
appAPI.notifier.events.add('close', function (data) {
  alert(data.name);
});

// Notification fade event - fires when the notification faded out. 
appAPI.notifier.events.add('fade', function (data) {
  alert(data.name);
});

// Remove listener to a specific event
appAPI.notifier.events.remove('click', clickCallback);

// Remove (close) and reset the current notification from the page
// This is usefull when you want to close the notification using your own events
appAPI.notifier.reset();
You can only add plugins to an extension you are working on
Add plugin Cancel This plugin has been added to your app Remove plugin from my app
WARNING!
You are on PRODUCTION mode - Adding or removing any of the plugins below will automatically update your live app including all of your users! Switch to STAGING mode to add plugins safely.
Crossrider
  • Sign Up
  • Sign In
  • Terms & Conditions
  • Privacy Policy
  • Contact Us
  • About Us
  • FAQ
  • Blog
Developers
  • Developer Center
  • Screencasts
  • Docs
  • Plugin Library
  • Demos
  • Q&A
Follow Us
  • Follow