What I would do is define a CSS class with the gradient and then use JQuery's addClass() method to add the class on some event such as a click. The code would look something like this:
$('selector').click().addClass('css-gradient-class');
On Mon, Jan 23, 2012 at 7:58 AM, Roberto <rcahanap@gmail.com> 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: css-design@googlegroups.com
To unsubscribe: css-design-unsubscribe@googlegroups.com
--
You received this because you are subscribed to the "Design the Web with CSS" at Google groups.
To post: css-design@googlegroups.com
To unsubscribe: css-design-unsubscribe@googlegroups.com
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.