The plugin adds a shadow to objects while moving the mouse cursor. The "light source" is your cursor. You may set from one to several shadows on objects.
- Download shadow.js file
- Move this file to your static directory
- Add the following line to html
<script type="text/javascript" src="static/js/shadow.js"></script>
after jQuery library
- Simple text shadow:
$('.text-selector').shadow('text-shadow', [{'width': 10, 'color': '#ffffff'}]);
- Simple box shadow:
$('.block-selector').shadow('box-shadow', [{'width': 10, 'color': 'rgb(0, 93, 154)'}]);
- Double text shadow:
$('.text-selector').shadow('text-shadow', [
{'width': 7.5, 'color': 'rgb(106, 86, 191)'},
{'width': 15, 'color': 'rgb(0, 93, 154)'}
]);
- First argument is shadow type (string):
text-shadow
orbox-shadow
- Second argument is shadow settings (array of objects):
[{"width": <decimal>, "color": <css color as string>}]
For example:[{'width': 15, 'color': 'rgb(0, 93, 154)'}, {'width': 7.5, 'color': '#ffffff'}]
width - max width of shadow in your browser window
color - css color