Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.33 KB

File metadata and controls

41 lines (33 loc) · 1.33 KB

mousemove-shadow (jQuery plugin)

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.

test

Installing

  1. Download shadow.js file
  2. Move this file to your static directory
  3. Add the following line to html
    <script type="text/javascript" src="static/js/shadow.js"></script>
    after jQuery library

Using

  • 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)'}
]);

API Reference

  • First argument is shadow type (string): text-shadow or box-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