-
Notifications
You must be signed in to change notification settings - Fork 8
/
README
73 lines (52 loc) · 1.95 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
jQuery Humanize Plugin - By Andy Kent
======================================================
This plugin is a great way of showing user feedback
without distracting flow. It shows a semi-transparent
overlay on top of the current page which fades away
as soon as the user interacts with the browser in
any way.
Usage
------------------------------------------------------
You will need to include both the JS and CSS files
first, feel free to customize the CSS as you feel
fit.
The first example will search for an element with a
class of 'feedback' and then display it's contents
to the user immediately, it's great for showing
rails flash messages and the like.
$(document).ready(function(){
$.humanize();
});
The second example shows the provided message to the
user as soon as it is called. This is great for use
in AJAX callbacks and validation checks.
$.humanize('hello this is a message');
Options
------------------------------------------------------
$.humanize([msg:String],options:Object);
The defaults should be fine for most people but the
plugin does take several options if you want to
customize things. Options can be passed in as the
last parameter to $.humanize(); or set globally
via $.humanize.defaults
baseSelector ('.feedback)
The jQuery selector to be used to find and display
the message.
container ('<p class="feedback"> </p>')
The html to use so a container can be added if none
exists.
fadeIn ({easing:'swing', duration:1000})
Options to be passed to the jQuery animate function
when fading the message in.
fadeOut ({easing:'swing', duration:1000})
Options to be passed to the jQuery animate function
when fading the message out.
opacity : 0.8
value between 0 and 1 for the final message opacity.
Credits
------------------------------------------------------
Created by: Andy Kent
Contributors: YOUR NAME HERE ?
I'd love to hear about any bugs/improvements/patches
that you may have and will always credit people where
appropriate. Thanks.