Fake iOS-style notifications with JS and CSS. View the index.html for examples.
$.fn.adios({ ... }); // create a notification immediately
$('a').adios({ ... }); // create a notification on click
$.fn.adios.close(); // closes an open notification
title
- the title of your notificationmessage
- the message of your notificationcancel_click
- if you're calling adios with a DOM element, this will preventDefault the click behaviorshade_callback
- fired when a user taps/clicks the background shadowshade_transparent
- removes the background shadebuttons
- an array of buttons. Each button is an object literal with has the following optional values:title
- button textclassname
- class to add to the button. The default "highlighted" button class isjqueryadios_button_highlighted
callback
href
You can set options with an object literal, or with data- attributes on the clickable element.
Note that any callbacks you specify this way will be eval
ed:
<a href="#" class="adiosdata" data-title="Notification title" data-buttons='[{"title" : "OK", "callback" : "$.fn.adios.close"}]'> Click me </a>