<commit_before>h1. okshadow

h2. OKShadow by OKFocus

p. OKShadow is a jQuery plugin that produces drop shadows that track the mouse cursor. Many effects are possible, including depth-of-field simulation and focus effects. See examples "here":http://okfoc.us/okshadow.

h2. Usage

p. OKShadow can bind to any DOM element that recognizes the CSS3 box-shadow or text-shadow property.

h3. Options

|_.option|_.description|_.default|
|color|sets shadow color|#888|
|textShadow|applies the shadow to the text; otherwise, the shadow affects the container ("box-shadow")|false|
|transparent|sets text color to transparent for ghost text effect|false|
|xMax|horizontal movement constraint, in pixels|null|
|yxOffset|horizontal offset, in pixels|0|
|xFactor|affects blur position based on mouse distance|30|
|yMax|vertical movement constraint, in pixels|null|
|yOffset|vertical offset, in pixels|0|
|yFactor|affects blur position based on mouse distance|30|
|fuzzMin|minimum blur radius in pixels|null|
|fuzzMax|maximum blur radius in pixels|null|
|fuzzFactor|affects blur radius based on mouse distance|40|

h3. Methods

p. OKShadow offers the method *setoption* so parameters can be changed after instantiation. It takes either a hash of parameters or a single key and value.<commit_msg>adding tests section to readme<commit_after>h1. okshadow

h2. OKShadow by OKFocus

p. OKShadow is a jQuery plugin that produces drop shadows that track the mouse cursor. Many effects are possible, including depth-of-field simulation and focus effects. See examples "here":http://okfoc.us/okshadow.

h2. Usage

p. OKShadow can bind to any DOM element that recognizes the CSS3 box-shadow or text-shadow property.

h3. Options

|_.option|_.description|_.default|
|color|sets shadow color|#888|
|textShadow|applies the shadow to the text; otherwise, the shadow affects the container ("box-shadow")|false|
|transparent|sets text color to transparent for ghost text effect|false|
|xMax|horizontal movement constraint, in pixels|null|
|yxOffset|horizontal offset, in pixels|0|
|xFactor|affects blur position based on mouse distance|30|
|yMax|vertical movement constraint, in pixels|null|
|yOffset|vertical offset, in pixels|0|
|yFactor|affects blur position based on mouse distance|30|
|fuzzMin|minimum blur radius in pixels|null|
|fuzzMax|maximum blur radius in pixels|null|
|fuzzFactor|affects blur radius based on mouse distance|40|

h3. Methods

p. OKShadow offers the method *setoption* so parameters can be changed after instantiation. It takes either a hash of parameters or a single key and value. For example:

bc. $('#ok').okshadow();
$('#ok').data("okshadow").setoption({
  "color": "red",
  "fuzzMin": 10,
});

h3. Run Tests

p. OKFocus tests JavaScript with Jasmine. Run tests:

bc. $ gem install jasmine
$ jasmine init
$ rake jasmine:ci
{'fraction_non_alphanumeric': 0.08711048158640226, 'fraction_numerical': 0.013101983002832862, 'mean_word_length': 5.524249422632795, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1723089', 'n_tokens_mistral': 835, 'n_tokens_neox': 811, 'n_words': 345}