The shadow plugin creates a drop shadow for the selected element(s). The element(s) selected must be absolute positioned or if they are not they are made absolutely positioned.

jQuery.fn.shadow = function(action|options)

action
An action verb string performed on the shadow:

  • hide - hides the shadow

if no action verb (string) is passed the options value can be used as the first parameter.

options
The following options and their default values are available:

var opt = { offset: 5, color: "#535353", opacity: 0.85, callback: null, zIndex: 100 };

refreshOnly
Internally used to refresh the shadow only rather than recreating it. Generally you don't need to worry about this parameter.

Simple Example

// Create a simple shadow with default settings $("#divDialog").shadow(); // Create with a couple of custom options $("#divFloatWindow").shadow( { offset: 8, opacity: .40 } ); // Hide the shadow $("#divDialog").shadow("hide");