Giter Club home page Giter Club logo

jquery-growl's Introduction

jQuery Growl

Growl is a jQuery plugin designed to provide informative messages in the browser.

Installation

To install copy the javascripts, and stylesheets directories into your project and add the following snippet to the header:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js" type="text/javascript"></script>
<script src="javascript/jquery.growl.js" type="text/javascript"></script>
<link href="stylesheets/jquery.growl.css" rel="stylesheet" type="text/css" />

This plugin is also registered under http://bower.io/ to simplify integration. Try:

npm install -g bower
bower install growl

Gemfile

+ source 'https://rails-assets.org'
...
+ gem 'rails-assets-growl'

application.css

/*
 ...
 *= require growl
 ...
*/

application.js

//= require jquery
...
//= require growl

Examples

Growling is easy:

<script type="text/javascript">
  $.growl({ title: "Growl", message: "The kitten is awake!", url: "/kittens" });
  $.growl.error({ message: "The kitten is attacking!" });
  $.growl.notice({ message: "The kitten is cute!" });
  $.growl.warning({ message: "The kitten is ugly!" });
</script>

Advanced Options

Growl also supports some customization through the following options:

  • delayOnHover: while hovering over the alert, prevent it from being dismissed (true | false - default: true)
  • duration: the duration (in milliseconds) for which the alert is displayed (default: 3200)
  • fixed: whether the alert should be fixed rather than auto-dismissed (true | false - default: false)
  • location: the alert's position ('tl' | 'tr' | 'bl' | 'br' | 'tc' | 'bc' - default: 'tr')
  • size: the alert's size ('small' | 'medium' | 'large' - default: 'medium')
  • style: the alert's style ('default' | 'error' | 'notice' | 'warning' - default: 'default')

Deprecations

  • static has been renamed to fixed due to minifier incompatabilities

Status

Status

Copyright

Copyright (c) 2010 - 2018 Kevin Sylvestre. See LICENSE for details.

jquery-growl's People

Contributors

ksylvest avatar tdyp avatar alihalabyah avatar gordonkristan avatar edelbluth avatar leewisestamp avatar mnigbur 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.