Giter Site home page Giter Site logo

toastr8's Introduction

toastr8

toastr8 is a jQuery notification plugin for creating Windows 8 metro inspired toast messages that use Font Awesome for notification icons.

Current Version

1.0.3

Demo

Wiki and Change Log

Wiki including Change Log

###3 Easy Steps For other API calls, see the demo.

  1. Link to toastr8.css <link href="http://rawgit.com/saribe/toastr8/master/dist/css/toastr8.min.css" rel="stylesheet"/>

  2. Link to toastr8.js <script src="http://rawgit.com/saribe/toastr8/master/dist/js/toastr8.min.js"></script>

  3. use toastr8 to display a toast notifcation

     // Display an info notification with no title
     toastr8.info('This is your dog birthday!');
    

Display an info notification with no title

	// Display an info notification with title
	toastr8.info('This is your dog birthday!', "Remember");

Display an info notification with no title

	// Alternative display an info notification with title and custom icon
	toastr8.info({
		message:'This is your dog birthday!', 
		title:"Remember",
		iconClass: "fa fa-calendar"
	});

Display an info notification with no title

	// Alternative display an info notification with title and custom icon and image from css class
	toastr8.info({
		message:'This is your dog birthday!', 
		title:"Remember",
		iconClass: "fa fa-calendar",
		imgClass: "dog-foto-img"
	});

Display an info notification with no title

	// Alternative display an info notification with title and custom icon and image from url
	toastr8.info({
		message:'This is your dog birthday!', 
		title:"Remember",
		iconClass: "fa fa-calendar",
		imgURI: ["http://domain/images/failoverDogFoto.jpg" "http://domain/images/niceFoto.png" ]
	});

Display an info notification with no title

Other Options

// able toasts
var toasts = ["info", "error", "warning", "success", "facebook", "twitter", "skype", "android", "linkedIn", "windows", "googlePlus", "gitHub"];

for(var i = 0, k = toasts.length; i < k; i++){

	toastr8[toasts[ i ] ]("message", "title");
}

Display an info notification with no title

// Clears the current list of toasts
toastr8.clear()

Display Sequence

Show newest toast at bottom (top is default)

toastr8.options.newestOnTop = false;

Callbacks

// Define a callback for when the toast is shown/hidden
toastr8.options.onShown = function() { console.log('hello'); }
toastr8.options.onHidden = function() { console.log('goodbye'); }

Authors

**Samuel Ribeiro **

Credits

Inspired by https://github.com/CodeSeven/toastr.

Copyright

Copyright © 2013 Samuel Ribeiro

License

toastr8 is under MIT license - http://www.opensource.org/licenses/mit-license.php

toastr8's People

Contributors

saribe avatar

Stargazers

Stepan avatar  avatar Javier Gonzalez avatar Ivan Vartanyan avatar Adriano Monecchi avatar Surya Oktafendri avatar  avatar M@dD3n avatar  avatar Sarath avatar Vinoth Kumar avatar liufajian avatar  avatar  avatar  avatar SINA avatar Arash Farahmandi avatar Johnny avatar tehface avatar Ensensis avatar James Price avatar  avatar  avatar

Watchers

Mike Castro Demaria avatar Johnny avatar  avatar subchan yayan bachtiar avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.