Skip to content

averyvery/jquery.adios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Adios 0.4.1

Fake iOS-style notifications with JS and CSS. View the index.html for examples.

Calling

$.fn.adios({ ... }); // create a notification immediately
$('a').adios({ ... }); // create a notification on click
$.fn.adios.close(); // closes an open notification

Options (all are optional)

  • title - the title of your notification
  • message - the message of your notification
  • cancel_click - if you're calling adios with a DOM element, this will preventDefault the click behavior
  • shade_callback - fired when a user taps/clicks the background shadow
  • shade_transparent - removes the background shade
  • buttons - an array of buttons. Each button is an object literal with has the following optional values:
    • title - button text
    • classname - class to add to the button. The default "highlighted" button class is jqueryadios_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 evaled:

	<a href="#"
		class="adiosdata"
		data-title="Notification title"
		data-buttons='[{"title" : "OK", "callback" : "$.fn.adios.close"}]'>
			Click me
	</a>

About

Fake iOS-style notifications in the browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published