Log In | Users | Register
Welcome, Registration, and other StartingPoints; Foswiki history & Wiki style; All the docs...
spacer
Edit | Attach | New | Raw | Delete | History | Diff | Print | Pdf | Subscribe | Tools
You are here: System » JQueryPlugin » JQueryGradient

JQueryGradient

Homepage: http://brandonaaron.net
Author(s): Brandon Aaron Last
Version: 1.0.1-pre

Adds a gradient to the background of an element.

Usage

JavaScript API

This basically looks like this:

$('div').gradient({ from: '000000', to: 'CCCCCC' });

Options:

  • from: The hex color code to start the gradient with. By default the value is "000000".
  • to: The hex color code to end the gradient with. By default the value is "FFFFFF".
  • direction: This tells the gradient to be horizontal or vertical. By default the value is "horizontal".
  • length: This is used to constrain the gradient to a particular width or height (depending on the direction). By default the length is set to null, which will use the width or height (depending on the direction) of the element.
  • position: This tells the gradient to be positioned at the top, bottom, left and/or right within the element. The value is just a string that specifices top or bottom and left or right. By default the value is 'top left'.

Foswiki integration

The gradient will be applied to elements with a jqGradient class name. Options are specified using JQueryMetadata.

Examples

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ornare fringilla est, eget condimentum quam auctor quis. Curabitur vitae nibh eu nisl scelerisque facilisis. Vestibulum posuere pretium magna, eu pulvinar libero cursus in. Phasellus tortor dui, viverra vitae molestie a, aliquam quis risus. Mauris fringilla mattis ligula, et laoreet dui rhoncus vel. Aliquam bibendum, nisi nec pellentesque convallis, augue elit rutrum sapien, nec molestie augue mauris et tellus.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ornare fringilla est, eget condimentum quam auctor quis. Curabitur vitae nibh eu nisl scelerisque facilisis. Vestibulum posuere pretium magna, eu pulvinar libero cursus in. Phasellus tortor dui, viverra vitae molestie a, aliquam quis risus. Mauris fringilla mattis ligula, et laoreet dui rhoncus vel. Aliquam bibendum, nisi nec pellentesque convallis, augue elit rutrum sapien, nec molestie augue mauris et tellus.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ornare fringilla est, eget condimentum quam auctor quis. Curabitur vitae nibh eu nisl scelerisque facilisis. Vestibulum posuere pretium magna, eu pulvinar libero cursus in. Phasellus tortor dui, viverra vitae molestie a, aliquam quis risus. Mauris fringilla mattis ligula, et laoreet dui rhoncus vel. Aliquam bibendum, nisi nec pellentesque convallis, augue elit rutrum sapien, nec molestie augue mauris et tellus.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ornare fringilla est, eget condimentum quam auctor quis. Curabitur vitae nibh eu nisl scelerisque facilisis. Vestibulum posuere pretium magna, eu pulvinar libero cursus in. Phasellus tortor dui, viverra vitae molestie a, aliquam quis risus. Mauris fringilla mattis ligula, et laoreet dui rhoncus vel. Aliquam bibendum, nisi nec pellentesque convallis, augue elit rutrum sapien, nec molestie augue mauris et tellus.
spacer
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback
Syndicate this site RSS ATOM