No, I just tried this, and it appears to work fine:
<style type="text/css" media="screen">
.blah {
background-color: #ccc;
}
body {
background-color: #fff;
}
</style>
<script src="scriptaculous/lib/prototype.js" type="text/javascript"
charset="utf-8"></script>
<script src="scriptaculous/src/scriptaculous.js"
type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="blah" class="blah">This is a div with a gray background.</div>
<script type="text/javascript" charset="utf-8">
new Effect.Highlight('blah', {startcolor:'#ff99ff'});
</script>
It picks up the end color from the computed style, and works from the
start color toward it. I did just notice that it doesn't deal well with
short-form color assignments -- if you have defined your start or
end-color as #cfc rather than #ccffcc, it just doesn't work (but
doesn't display any error in Firebug).
Walter
On Aug 18, 2007, at 1:32 PM, Daniel Eben Elmore wrote:
>
> Yes but it's applied with a CSS class. Are saying I should apply it
> inline?
>
>
> Daniel
>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Walter Lee
> Davis
> Sent: Saturday, August 18, 2007 12:18 PM
> To: [email protected]
> Subject: [Rails-spinoffs] Re: Effect.Highlight with existing background
> color.
>
>
> Are you using the background: or background-color: property to set the
> original color? I believe the latter will work, it has always done for
> me.
>
> Walter
>
> On Aug 18, 2007, at 11:54 AM, Daniel Eben Elmore wrote:
>
>>
>> I can't get Effect.Highlight to work when there is already a
>> background
>> color applied to my Div.
>>
>> new Effect.Highlight(e, { startcolor:'#77FC77', endcolor:'#F6F1C1' });
>>
>> Same code, add a background color and it quits Highlighting.
>>
>>
>>
>> Daniel
>>
>>
>>
>>>
>
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---