On Sep 7, 2007, at 11:13 AM, Andy Matthews wrote:

Are you serious?

I wouldn't joke around about something so important, Andy. ;-)

You'd have to have a plugin to animate a CSS property?

Only some of them. jQuery core's .animate() works for any numeric CSS property (such as top, left, width, height, fontSize, marginLeft, etc.), but it doesn't work for colors.

Is it just because it's the body background or does that apply to any background in any element?


It applies to any background in any element.


--Karl




From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Karl Swedberg
Sent: Friday, September 07, 2007 9:55 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to fade only the background?

On Sep 7, 2007, at 9:20 AM, Andy Matthews wrote:

Or you could animate the backgroundColor property.


Yes, but you'll need the Interface plugin for that (at least iuitil.js and ifx.js, IIRC).
http://interface.eyecon.ro

Unfortunately, however, Interface overwrites jQuery's .animate() method, rather than extending it, which has caused problems for some people in the past. Don't know if that has been fixed/worked around or not. Maybe it's worth a shot, though.

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Erik Beeson
Sent: Friday, September 07, 2007 12:20 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to fade only the background?

Changing opacity affects all child elements. To only fade the "background" just don't have the foreground be a child of it. You could use absolute or relative positioning or negative margins or floats.

--Erik


On 9/6/07, howa <[EMAIL PROTECTED] > wrote:

Hi,

The following code will fade the logo, instead of bg, e.g.


<html>
<head>
<script src=" http://jqueryjs.googlecode.com/files/
jquery-1.1.4.pack.js" ></script>
<style> #bg{ width:600px; height:600px; background-color:blue; } </
style>
</head>
<body>

<script>
jQuery(document).ready(function() {
jQuery("#bg").fadeTo("slow", 0.5);
jQuery("#logo").fadeTo("slow", 1.0);
});
</script>

<div id="bg">
<img id="logo" src=" http://www.w3.org/Icons/w3c_main"; />
</div>

</body>
</html>

any workaround?

thanks.




Reply via email to