Gradientz :: jQuery plugin

The following gradients were rendered by your browser. No images!

        $('#box1').gradientz({
          start: "#fcc",
          end: "yellow"
        })
        
        $('#box2').gradientz({
          angle: 90,
          start: "#008",
          end: "#08f"
        })
      
      
        $('#box3').gradientz({
          angle: 45,
          start: "#008",
          end: "red"
        })
      

More examples

Usage

        $(selector).gradientz({
          start: "red",     // start color: default is the background color
          end: "blue",      // end color: default is the background color.
          distance: 100,    // size: default is width/height depending on size
          angle: 72,         // angle from vertical. Default is 0, i.e. vertical.
          css: "right: 0px" // additional CSS: default is "top: 0px; left: 0px"
        })
      

Notes

Version History

0.1

Initial release.

0.2

Fixed Problem with canvas positioning

0.3

Added Support for "distance",

Default colors from background

Added additional positioning CSS options

0.4

Added support for negative angles and some more examples

Fix IE strange border effects with overflow: hidden and adding 1px to width and height of VML

Now wrap innerHTML in a div to preserve zIndex