Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 44 lines (25 sloc) 0.996 kB
5d1536d @sagivo readme markup
authored
1 jQuery-Watermark
305d887 @sagivo readme markup
authored
2 =============
3
4 An extra-small ( <1k ) and easy watermark creator for inputs.
5
3030a55 @sagivo readme
authored
6 A working demo is under `sample` folder.
7
7724953 @sagivo readme
authored
8 Installation
305d887 @sagivo readme markup
authored
9 --------------
10
7724953 @sagivo readme
authored
11 Go to the fridge and drink some beer.
3843562 @sagivo readme
authored
12
7724953 @sagivo readme
authored
13 Include jQuery script:
e043740 @sagivo readme markup
authored
14
709e21e @sagivo readme
authored
15 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
e043740 @sagivo readme markup
authored
16
7b9b142 @sagivo readme
authored
17 Download `jquery-watermark.min.js` script and include it in your page:
e043740 @sagivo readme markup
authored
18
709e21e @sagivo readme
authored
19 <script src="jquery-watermark.min.js" type="text/javascript"></script>
e043740 @sagivo readme markup
authored
20
7724953 @sagivo readme
authored
21 Define your params (if you want):
e043740 @sagivo readme markup
authored
22
5257a49 @sagivo readme
authored
23 var params = { activeCss: { 'color': 'Black', 'background-color': 'Blue', 'font-size': '20px' }, waterCss: {color: 'Gray'}};
e043740 @sagivo readme markup
authored
24
7724953 @sagivo readme
authored
25 The defaults are:
e043740 @sagivo readme markup
authored
26
709e21e @sagivo readme
authored
27 'waterCss': { color: 'Gray' },
28 'activeCss': { color: 'Black' }
e043740 @sagivo readme markup
authored
29
7b9b142 @sagivo readme
authored
30 From within your code call to the `watermark()` function on your selector (in this case i used input fields).
e043740 @sagivo readme markup
authored
31
0a8b2bb @sagivo removed min version
authored
32 $("input").watermark(params);
709e21e @sagivo readme
authored
33
7724953 @sagivo readme
authored
34 Go and have another beer.
305d887 @sagivo readme markup
authored
35
36
37 Contribution
38 ------------
39
40 - Sagiv Ofek
41
42 License
43 -------
44 free for all! :)
Something went wrong with that request. Please try again.