New Plugin: Gradient

Tuesday, June 26, 2007

I just added a new plugin called, gradient. It dynamically applies a configurable gradient to the background of an element. You create a gradient like this:

$('.gradient').gradient({ from: '003366', to: 'FFFFFF' });

Check out the visual test, read the docs and grab the code.

Posted in jQuery with 6 comments

Comments

Now that generates a heck lot of divs. Interesting stuff!

By Jörn Zaefferer on Wednesday, June 27, 2007 at 05:36 AM

Hey Jörn … Depending on the length of the gradient it will generate up to 100 divs.

By Brandon Aaron on Tuesday, July 17, 2007 at 08:21 AM

awesome!!!!!

By pako on Tuesday, July 17, 2007 at 08:21 AM

but so slow ;[

By pako on Wednesday, July 18, 2007 at 01:35 AM

How are you using it pako? Do you have an example of where it is so slow?

By Brandon Aaron on Wednesday, July 18, 2007 at 08:13 AM

Agreed! Very nice!

Suggestions:

  1. If length is specified, the remainder of the original should be the filled with the second color rather than black.

  2. It would be helpful to allow block elements in the without having to specify style=”display:inline; background-color:transparent;” on the block element. Thanks!

By DK Lynn on Sunday, July 22, 2007 at 05:04 PM

New Comment