Yes. I suggest looking into JQuery <http://jquery.com/>.

What I would do is define a CSS class with the gradient and then use
JQuery's addClass() <http://api.jquery.com/addClass/> method to add the
class on some event such as a click <http://api.jquery.com/click/>. The
code would look something like this:

$('selector <http://api.jquery.com/category/selectors/>
').click().addClass('css-gradient-class');

On Mon, Jan 23, 2012 at 7:58 AM, Roberto <[email protected]> wrote:

> Is it possible to do this dynamically in javascript?
>
> background: -webkit-gradient(linear, left top, left bottom,
> from(#55aaee), to(#003366));
>
> I want to be able to code in the from and the to dynamically.
>
> There's so much to learn about CSS!
>
> -Roberto
>
> --
> --
> You received this because you are subscribed to the "Design the Web with
> CSS" at Google groups.
> To post: [email protected]
> To unsubscribe: [email protected]

-- 
--
You received this because you are subscribed to the "Design the Web with CSS" 
at Google groups.
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to