Skip to content

Commit

Permalink
Add syntax highlighting to README
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 4, 2012
1 parent f46595a commit 1da35ab
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions README.md
Expand Up @@ -5,31 +5,37 @@ Works in any browser supporting CSS box-shadow property.

## Basic Usage

$(selector).realshadow(); // options are optional
```javascript
$(selector).realshadow(); // options are optional

$(selector).realshadow({
$(selector).realshadow({

followMouse: false, // true by default
followMouse: false, // true by default

pageX: x, // x coordinate of the light source
pageY: y // y coordinate of the light source
pageX: x, // x coordinate of the light source
pageY: y // y coordinate of the light source

c: { // shadow color
r: 1, // red channel for shadow
g: 1, // green channel for shadow
b: 1, // blue channel for shadow
}
c: { // shadow color
r: 1, // red channel for shadow
g: 1, // green channel for shadow
b: 1, // blue channel for shadow
}

});
});
```

To specify different colors for each element, you can use "rel" attribute:

<span rel="r"></span>
<span rel="g"></span>
<span rel="b"></span>
<span rel="rg"></span>
<span rel="gb"></span>
<span rel="br"></span>
<span rel="rgb"></span>

$('span').realshadow();
```html
<span rel="r"></span>
<span rel="g"></span>
<span rel="b"></span>
<span rel="rg"></span>
<span rel="gb"></span>
<span rel="br"></span>
<span rel="rgb"></span>
```

```javascript
$('span').realshadow();
```

0 comments on commit 1da35ab

Please sign in to comment.