Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (30 sloc) 0.969 kb
c362ed5 @Indamix updated readme
authored
1 # [Real Shadow](http://indamix.github.com/real-shadow/) - jQuery Plugin that casts photorealistic shadows
d545c43 @Indamix >
authored
2 Perfect for eye-catching demos and landing pages.
f46595a @Indamix >
authored
3
d545c43 @Indamix >
authored
4 Works in any browser supporting CSS box-shadow property.
c362ed5 @Indamix updated readme
authored
5
6 ## Basic Usage
7
1da35ab @sindresorhus Add syntax highlighting to README
sindresorhus authored
8 ```javascript
9 $(selector).realshadow(); // options are optional
c362ed5 @Indamix updated readme
authored
10
1da35ab @sindresorhus Add syntax highlighting to README
sindresorhus authored
11 $(selector).realshadow({
c362ed5 @Indamix updated readme
authored
12
1da35ab @sindresorhus Add syntax highlighting to README
sindresorhus authored
13 followMouse: false, // true by default
c362ed5 @Indamix updated readme
authored
14
1da35ab @sindresorhus Add syntax highlighting to README
sindresorhus authored
15 pageX: x, // x coordinate of the light source
16 pageY: y // y coordinate of the light source
c362ed5 @Indamix updated readme
authored
17
1da35ab @sindresorhus Add syntax highlighting to README
sindresorhus authored
18 c: { // shadow color
19 r: 1, // red channel for shadow
20 g: 1, // green channel for shadow
21 b: 1, // blue channel for shadow
22 }
c362ed5 @Indamix updated readme
authored
23
1da35ab @sindresorhus Add syntax highlighting to README
sindresorhus authored
24 });
25 ```
c362ed5 @Indamix updated readme
authored
26
d5abf5c @Indamix upd8
authored
27 To specify different colors for each element, you can use "rel" attribute:
c362ed5 @Indamix updated readme
authored
28
1da35ab @sindresorhus Add syntax highlighting to README
sindresorhus authored
29 ```html
30 <span rel="r"></span>
31 <span rel="g"></span>
32 <span rel="b"></span>
33 <span rel="rg"></span>
34 <span rel="gb"></span>
35 <span rel="br"></span>
36 <span rel="rgb"></span>
37 ```
38
39 ```javascript
40 $('span').realshadow();
41 ```
Something went wrong with that request. Please try again.