/simple_alert_app

An application demo the simple alert!

Primary LanguageJavaScript

SimpleAlertApp简单地实现了jquery alert。

Feature

  1. 图标的样式(bootstrap的icon)

  2. 背景颜色

  3. 出现的位置

Usage

  • Alert Basics

<%= simple_alert "Message" %>

  • Alert with title

<%= simple_alert "Message", :title => "Title" %>

  • Alert with icon

<%= simple_alert "Message", :icon => :music %>

  • Alert有5种类型,分别为:default, success, info, warning和danger,你能通过设置type来定义类型

You can use it like this: <%= simple_alert "Be carefully", :icon => :question_sign, :type => :danger %>

  • 图标的样式与bootstrap的icon样式一样

另外simple_alert有4个显示位置,分别为左上角,左下角,右上角和右下角,你能通过设置point来定义位置

You can use it like this:

  1. 左上角:<%= simple_alert "左上角", :title => "Demo", :icon => :tags, :point => [:left, :top] %>

  2. 左下角:<%= simple_alert "左下角", :title => "Demo", :icon => :tags, :point => [:left, :bottom] %>

  3. 右上角:<%= simple_alert "左上角", :title => "Demo", :icon => :tags, :point => [:left, :top] %>

  4. 右下角:<%= simple_alert "左下角", :title => "Demo", :icon => :tags, :point => [:left, :bottom] %>

系统默认是右上角