Giter Site home page Giter Site logo

toast's Introduction

Toast

Toast is javascript based library for displaying a message or a notification on your website.

  • javscript version : toast-js.js and toast-js.min.js
  • jquery version : toast-jq.js and toast-jq.min.js

Toast

How to use ?

createToast is a function attached to the window.

createToast({ 
    message: 'This is your new toast', 
    autoHide: false, 
    closeButton: true 
});

Options to be passed to the functions :

Key description
message Message Text to be shown in the toast
toastClass text - multiple classes separated by spaces
action Object
action.actionText text
action.actionClass text - multiple classes separated by spaces
closeButton Boolean : default true
closeClickEvent function : default undefined
autoHide Boolean : default true : true if closeButton is false
autoHideTime integer : default 3000ms
unique unique toast check : for this toastId parameter is must
toastId string : for uniqueness of the toast

Tech

Toast uses number of open source projects :

  • javascript - Accessing the html and appending data into dom!
  • jQuery - Accessing the html and appending data into dom!
  • Css - Providing awesome style to the toast elements.

And of course Toast itself is open source with a public repository on GitHub.

Installation

Toast requires jQuery any version preferably latest to run if toast-jq or toast-jq.min is used.

* Include the script file and css file into your html
* Change the css for the display container and the toast message box.

Special attention should be given to the z-index of the toast container if doesn't show up.

Toast is based on flex property of the css, so some browsers do not support flex yet. Change css as per your requirements.

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.