This is related to a previous post, but I think I found another bug
which needs more attention..
Case:
<div id="test_opbg" style="width:400px; height:500px;
display:block;
background-image: url(/imgs/menu/menu_srajca.gif);">
When I try setting the opacity to 0.5 ( $
(''test_opbg'').setOpacity(0.5); ) the background image is
visible and
half-transparent
When I try Effect.Opacity (either way), the background disappears!
This is only true in IE6
Test case is here:
http://www.drustvo-kgosf.si/test_bg_opacity.html
Can someone explain to me why this happens?
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
I debugged this little mother of a "bug". When using DIV with a background image, each time you change opacity the image is redrawn by IE6. If you happen ti have your caching settings in IE set to "Check for newer versions: Every visit to the page", this means that the bg-image is downloaded for each step of Effect.Opacity, because then, IE does not cache the image (stupid). I switched it to "Automatically" and it works like a charm. Be careful when using effects with background images. A lot of people have caching disabled... On Dec 3, 9:37 pm, LexNonScripta <lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This is related to a previous post, but I think I found another bug > which needs more attention.. > > Case: > <div id="test_opbg" style="width:400px; height:500px; display:block; > background-image: url(/imgs/menu/menu_srajca.gif);"> > > When I try setting the opacity to 0.5 ( $ > (''test_opbg'').setOpacity(0.5); ) the background image is visible and > half-transparent > > When I try Effect.Opacity (either way), the background disappears! > > This is only true in IE6 > > Test case is here:http://www.drustvo-kgosf.si/test_bg_opacity.html > > Can someone explain to me why this happens?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
The following snippet should do the trick, whether they have caching
enabled or not
<!--[if IE]>
<script type="text/javascript">
// <![CDATA[
try {
document.execCommand(''BackgroundImageCache'', false,
true);
} catch(e) {}
// ]]>
</script>
<![endif]-->
Source: http://evil.che.lu/2006/9/25/no-more-ie6-background-flicker
Best,
-Nicolas
On Dec 5, 2007 9:31 AM, LexNonScripta
<lex.non.scripta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I debugged this little mother of a "bug".
>
> When using DIV with a background image, each time you change opacity
> the image is redrawn by IE6. If you happen ti have your caching
> settings in IE set to "Check for newer versions: Every visit to the
> page", this means that the bg-image is downloaded for each step of
> Effect.Opacity, because then, IE does not cache the image (stupid).
>
> I switched it to "Automatically" and it works like a charm.
>
> Be careful when using effects with background images. A lot of people
> have caching disabled...
>
>
> On Dec 3, 9:37 pm, LexNonScripta
<lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > This is related to a previous post, but I think I found another bug
> > which needs more attention..
> >
> > Case:
> > <div id="test_opbg" style="width:400px;
height:500px; display:block;
> > background-image: url(/imgs/menu/menu_srajca.gif);">
> >
> > When I try setting the opacity to 0.5 ( $
> > (''test_opbg'').setOpacity(0.5); ) the background
image is visible and
> > half-transparent
> >
> > When I try Effect.Opacity (either way), the background disappears!
> >
> > This is only true in IE6
> >
> > Test case is here:http://www.drustvo-kgosf.si/test_bg_opacity.html
> >
> > Can someone explain to me why this happens?
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
This snippet is SOOO GREAT! It''s one of those snips which you MUST have if you work with effects I think the guys at script.aculo.us should consider embedding this in their code... It caused me a lot of grief. Almost lost a client there... Thanks a million for this solution! On Dec 5, 12:47 pm, "Nicolás Sanguinetti" <godf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The following snippet should do the trick, whether they have caching > enabled or not > > <!--[if IE]> > <script type="text/javascript"> > // <![CDATA[ > try { > document.execCommand(''BackgroundImageCache'', false, true); > } catch(e) {} > // ]]> > </script> > <![endif]--> > > Source:http://evil.che.lu/2006/9/25/no-more-ie6-background-flicker > > Best, > -Nicolas > > On Dec 5, 2007 9:31 AM, LexNonScripta <lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I debugged this little mother of a "bug". > > > When using DIV with a background image, each time you change opacity > > the image is redrawn by IE6. If you happen ti have your caching > > settings in IE set to "Check for newer versions: Every visit to the > > page", this means that the bg-image is downloaded for each step of > > Effect.Opacity, because then, IE does not cache the image (stupid). > > > I switched it to "Automatically" and it works like a charm. > > > Be careful when using effects with background images. A lot of people > > have caching disabled... > > > On Dec 3, 9:37 pm, LexNonScripta <lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > This is related to a previous post, but I think I found another bug > > > which needs more attention.. > > > > Case: > > > <div id="test_opbg" style="width:400px; height:500px; display:block; > > > background-image: url(/imgs/menu/menu_srajca.gif);"> > > > > When I try setting the opacity to 0.5 ( $ > > > (''test_opbg'').setOpacity(0.5); ) the background image is visible and > > > half-transparent > > > > When I try Effect.Opacity (either way), the background disappears! > > > > This is only true in IE6 > > > > Test case is here:http://www.drustvo-kgosf.si/test_bg_opacity.html > > > > Can someone explain to me why this happens?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---