Skip to content

JQuery shadow plugin (changing of shadow when 'mousemove' event)

Notifications You must be signed in to change notification settings

Seg-mel/mousemove-shadow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Мусихин АндрейМусихин Андрей
Мусихин Андрей
and
Мусихин Андрей
Jan 8, 2015
7ebdfc4 · Jan 8, 2015

History

12 Commits
Jan 2, 2015
Jan 3, 2015
Jan 8, 2015
Jan 8, 2015

Repository files navigation

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

About

JQuery shadow plugin (changing of shadow when 'mousemove' event)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published