HighDots Forums  

opacity

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss opacity in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Phillip Parr
 
Posts: n/a

Default opacity - 11-30-2004 , 07:07 PM






Hey all,

I'm animating a menu by changing its opacity (with javascript) from 0 to 100
in steps of 10 at 10ms intervals. It works perfectly the first time, the
problem is that after it's done it once it doesn't work again. I've checked
and the loop is definatly working, the values are definatly being set etc, I
see no reason why it stops working after the first time. Any ideas?

code is at http://www.photash.com/menu.html (currently MSIE only)

Phil



Reply With Quote
  #2  
Old   
Spartanicus
 
Posts: n/a

Default Re: opacity - 11-30-2004 , 09:33 PM






"Phillip Parr" <no (AT) no (DOT) com> wrote:

Quote:
(with javascript)

Any ideas?
Don't crosspost js questions to a stylesheet newsgroup.

Quote:
(currently MSIE only)
Note the "www" in this group's name, we author for the web.

--
Spartanicus


Reply With Quote
  #3  
Old   
Daniel Kirsch
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 04:25 AM



Phillip Parr wrote:
Quote:
I'm animating a menu by changing its opacity (with javascript) from 0 to 100
in steps of 10 at 10ms intervals. It works perfectly the first time, the
problem is that after it's done it once it doesn't work again. I've checked
and the loop is definatly working, the values are definatly being set etc, I
see no reason why it stops working after the first time. Any ideas?
I don't know what causes IE to not animate it the second time. However,
adding an additional
document.getElementById(animate).style.filter="alp ha(opacity=100)";

in your fadeIn function, might be a workaround:

function fadeIn()
{
if(!opacityx) {
anitimer=setInterval("fadeIn();",10);
document.getElementById(animate).style.filter="alp ha(opacity=100)";
}
...
}

Daniel


Reply With Quote
  #4  
Old   
Phillip Parr
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 08:16 AM



opacity is a css element, for all i knew it could have been a css problem.


"Spartanicus" <me (AT) privacy (DOT) net> wrote

Quote:
"Phillip Parr" <no (AT) no (DOT) com> wrote:

(with javascript)

Any ideas?

Don't crosspost js questions to a stylesheet newsgroup.

(currently MSIE only)

Note the "www" in this group's name, we author for the web.

--
Spartanicus



Reply With Quote
  #5  
Old   
Spartanicus
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 08:53 AM



Top posting is not appreciated here, snipping quotes is. Corrected this
once.

"Phillip Parr" <no (AT) no (DOT) com> wrote:

Quote:
(with javascript)

Any ideas?

Don't crosspost js questions to a stylesheet newsgroup.

(currently MSIE only)

Note the "www" in this group's name, we author for the web.

opacity is a css element
Proposed for CSS3, not working in any browser.

--
Spartanicus


Reply With Quote
  #6  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 10:59 AM



*Spartanicus* <me (AT) privacy (DOT) net>:
Quote:
"Phillip Parr" <no (AT) no (DOT) com> wrote:

opacity is a css element

Proposed for CSS3, not working in any browser.
At least not under that name, i.e. without a vendor prefix.

--
Ociffer, I swear to drunk, I'm not God!


Reply With Quote
  #7  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 11:27 AM




"Phillip Parr" <no (AT) no (DOT) com> wrote

Quote:
"Spartanicus" <me (AT) privacy (DOT) net> wrote in message
news:78bqq0tsajc39fuqdbl4i6e9i8sr76tcb6 (AT) news (DOT) spartanicus.utvinternet.ie...
"Phillip Parr" <no (AT) no (DOT) com> wrote:

(with javascript)

Any ideas?

Don't crosspost js questions to a stylesheet newsgroup.

(currently MSIE only)

Note the "www" in this group's name, we author for the web.

opacity is a css element, for all i knew it could have been a css problem.
You're using the "filter" property, which is not a CSS property. It's a
Microsoft extension.



Reply With Quote
  #8  
Old   
Neal
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 11:40 AM



On Wed, 1 Dec 2004 13:16:44 +0000 (UTC), Phillip Parr <no (AT) no (DOT) com> wrote:

Quote:
opacity is a css element, for all i knew it could have been a css
problem.

1) No elements in CSS> I assume you meant to say "property".

2) http://www.w3.org/TR/CSS21/propidx.html - no such property. It's
apparently a proprietory property, not properly valid CSS.


Reply With Quote
  #9  
Old   
Phillip Parr
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 12:51 PM




"Spartanicus" <me (AT) privacy (DOT) net> wrote

Quote:
Top posting is not appreciated here, snipping quotes is. Corrected this
once.

"Phillip Parr" <no (AT) no (DOT) com> wrote:

(with javascript)

Any ideas?

Don't crosspost js questions to a stylesheet newsgroup.

(currently MSIE only)

Note the "www" in this group's name, we author for the web.

opacity is a css element

Proposed for CSS3, not working in any browser.

--
Spartanicus
You lot are pretty harsh to people who don't know your little set of
'rules'.




Reply With Quote
  #10  
Old   
Phillip Parr
 
Posts: n/a

Default Re: opacity - 12-01-2004 , 12:57 PM



Thanks for your help, it wasn't quite the solution but using the same logic
I removed the section of code where i explicitly set the opacity to 0 and
that worked great. You're also the only person that tried to help, the
people from the css place are really, VERY snooty!

Phil

"Daniel Kirsch" <Iwillnotread_daniel (AT) gmx (DOT) de> wrote

Quote:
Phillip Parr wrote:
I'm animating a menu by changing its opacity (with javascript) from 0 to
100 in steps of 10 at 10ms intervals. It works perfectly the first time,
the problem is that after it's done it once it doesn't work again. I've
checked and the loop is definatly working, the values are definatly being
set etc, I see no reason why it stops working after the first time. Any
ideas?

I don't know what causes IE to not animate it the second time. However,
adding an additional
document.getElementById(animate).style.filter="alp ha(opacity=100)";

in your fadeIn function, might be a workaround:

function fadeIn()
{
if(!opacityx) {
anitimer=setInterval("fadeIn();",10);
document.getElementById(animate).style.filter="alp ha(opacity=100)";
}
...
}

Daniel



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.