opacity

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phillip Parr

    opacity

    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


  • Spartanicus

    #2
    Re: opacity

    "Phillip Parr" <no@no.com> wrote:
    [color=blue]
    >(with javascript)[/color]
    [color=blue]
    >Any ideas?[/color]

    Don't crosspost js questions to a stylesheet newsgroup.
    [color=blue]
    >(currently MSIE only)[/color]

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

    --
    Spartanicus

    Comment

    • Daniel Kirsch

      #3
      Re: opacity

      Phillip Parr wrote:[color=blue]
      > 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?[/color]

      I don't know what causes IE to not animate it the second time. However,
      adding an additional
      document.getEle mentById(animat e).style.filter ="alpha(opacity =100)";

      in your fadeIn function, might be a workaround:

      function fadeIn()
      {
      if(!opacityx) {
      anitimer=setInt erval("fadeIn() ;",10);
      document.getEle mentById(animat e).style.filter ="alpha(opacity =100)";
      }
      ...
      }

      Daniel

      Comment

      • Phillip Parr

        #4
        Re: opacity

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


        "Spartanicu s" <me@privacy.net > wrote in message
        news:78bqq0tsaj c39fuqdbl4i6e9i 8sr76tcb6@news. spartanicus.utv internet.ie...[color=blue]
        > "Phillip Parr" <no@no.com> wrote:
        >[color=green]
        >>(with javascript)[/color]
        >[color=green]
        >>Any ideas?[/color]
        >
        > Don't crosspost js questions to a stylesheet newsgroup.
        >[color=green]
        >>(currently MSIE only)[/color]
        >
        > Note the "www" in this group's name, we author for the web.
        >
        > --
        > Spartanicus[/color]


        Comment

        • Spartanicus

          #5
          Re: opacity

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

          "Phillip Parr" <no@no.com> wrote:
          [color=blue][color=green][color=darkred]
          >>>(with javascript)[/color]
          >>[color=darkred]
          >>>Any ideas?[/color]
          >>
          >> Don't crosspost js questions to a stylesheet newsgroup.
          >>[color=darkred]
          >>>(currently MSIE only)[/color]
          >>
          >> Note the "www" in this group's name, we author for the web.[/color][/color]
          [color=blue]
          >opacity is a css element[/color]

          Proposed for CSS3, not working in any browser.

          --
          Spartanicus

          Comment

          • Christoph Paeper

            #6
            Re: opacity

            *Spartanicus* <me@privacy.net >:[color=blue]
            > "Phillip Parr" <no@no.com> wrote:
            >[color=green]
            >> opacity is a css element[/color]
            >
            > Proposed for CSS3, not working in any browser.[/color]

            At least not under that name, i.e. without a vendor prefix.

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

            Comment

            • Harlan Messinger

              #7
              Re: opacity


              "Phillip Parr" <no@no.com> wrote in message
              news:cokg7s$118 $1@sparta.btint ernet.com...[color=blue]
              >
              > "Spartanicu s" <me@privacy.net > wrote in message
              > news:78bqq0tsaj c39fuqdbl4i6e9i 8sr76tcb6@news. spartanicus.utv internet.ie...[color=green]
              > > "Phillip Parr" <no@no.com> wrote:
              > >[color=darkred]
              > >>(with javascript)[/color]
              > >[color=darkred]
              > >>Any ideas?[/color]
              > >
              > > Don't crosspost js questions to a stylesheet newsgroup.
              > >[color=darkred]
              > >>(currently MSIE only)[/color]
              > >
              > > Note the "www" in this group's name, we author for the web.[/color][/color]
              [color=blue]
              > opacity is a css element, for all i knew it could have been a css problem.[/color]

              You're using the "filter" property, which is not a CSS property. It's a
              Microsoft extension.

              Comment

              • Neal

                #8
                Re: opacity

                On Wed, 1 Dec 2004 13:16:44 +0000 (UTC), Phillip Parr <no@no.com> wrote:
                [color=blue]
                > opacity is a css element, for all i knew it could have been a css
                > problem.[/color]


                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.

                Comment

                • Phillip Parr

                  #9
                  Re: opacity


                  "Spartanicu s" <me@privacy.net > wrote in message
                  news:voirq0h3dl d6dsebqbq9israj svtts77rj@news. spartanicus.utv internet.ie...[color=blue]
                  > Top posting is not appreciated here, snipping quotes is. Corrected this
                  > once.
                  >
                  > "Phillip Parr" <no@no.com> wrote:
                  >[color=green][color=darkred]
                  >>>>(with javascript)
                  >>>
                  >>>>Any ideas?
                  >>>
                  >>> Don't crosspost js questions to a stylesheet newsgroup.
                  >>>
                  >>>>(currentl y MSIE only)
                  >>>
                  >>> Note the "www" in this group's name, we author for the web.[/color][/color]
                  >[color=green]
                  >>opacity is a css element[/color]
                  >
                  > Proposed for CSS3, not working in any browser.
                  >
                  > --
                  > Spartanicus[/color]

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


                  Comment

                  • Phillip Parr

                    #10
                    Re: opacity

                    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_d aniel@gmx.de> wrote in message
                    news:cok2jj$4n6 $04$1@news.t-online.com...[color=blue]
                    > Phillip Parr wrote:[color=green]
                    >> 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?[/color]
                    >
                    > I don't know what causes IE to not animate it the second time. However,
                    > adding an additional
                    > document.getEle mentById(animat e).style.filter ="alpha(opacity =100)";
                    >
                    > in your fadeIn function, might be a workaround:
                    >
                    > function fadeIn()
                    > {
                    > if(!opacityx) {
                    > anitimer=setInt erval("fadeIn() ;",10);
                    > document.getEle mentById(animat e).style.filter ="alpha(opacity =100)";
                    > }
                    > ...
                    > }
                    >
                    > Daniel[/color]


                    Comment

                    • Mark Tranchant

                      #11
                      Re: opacity

                      Phillip Parr wrote:
                      [color=blue]
                      > You lot are pretty harsh to people who don't know your little set of
                      > 'rules'.[/color]

                      I'd say deal with it, and don't take it personally. This group is a
                      bunch of normal people with an above-average knowledge of CSS. The
                      easiest questions to answer are those which follow our little set of
                      rules, which apply across most technical newsgroups.

                      Learn from the experience - we all have - and you'll find a better
                      response to future questions. But yes, as a bunch of closet geeks, we
                      can be fairly terse at times when asked to answer questions on
                      IE-specific Javascript...

                      Welcome!

                      --
                      Mark.

                      Comment

                      • Mark Tranchant

                        #12
                        Re: opacity

                        Phillip Parr wrote:[color=blue]
                        > 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![/color]

                        Because it wasn't a CSS question. See my response in ciwas about snootiness.

                        PS you top-posted again... ;-)

                        --
                        Mark.

                        Comment

                        • Brian

                          #13
                          Re: opacity

                          Phillip Parr wrote:[color=blue]
                          > "Spartanicu s" wrote ...
                          >[color=green]
                          >> Top posting is not appreciated here, snipping quotes is. Corrected
                          >> this once.
                          >>[/color]
                          > You lot are pretty harsh to people who don't know your little set of
                          > 'rules'.[/color]

                          That we are. You'd do well to learn those rules if you want help. If you
                          don't want help, then you needn't follow them.

                          HTH.

                          --
                          Brian (remove "invalid" to email me)

                          Comment

                          • Phillip Parr

                            #14
                            Re: opacity

                            This I understand, but firstly it was technically a css issue, as it was to
                            do with css styles, the fact that I was using IE specific opacity is neither
                            here nor there, I like to get code working in one browser before I make it
                            work in others too.
                            Secondly It'd be nice to be told the rules, rather than have them ranted at
                            me like some nerdy 15 year old spot machine was trying to offend me!


                            "Brian" <usenet3@juliet remblay.com.inv alid> wrote in message
                            news:HvArd.1015 207$Gx4.234368@ bgtnsc04-news.ops.worldn et.att.net...[color=blue]
                            > Phillip Parr wrote:[color=green]
                            >> "Spartanicu s" wrote ...
                            >>[color=darkred]
                            >>> Top posting is not appreciated here, snipping quotes is. Corrected
                            >>> this once.
                            >>>[/color]
                            >> You lot are pretty harsh to people who don't know your little set of
                            >> 'rules'.[/color]
                            >
                            > That we are. You'd do well to learn those rules if you want help. If you
                            > don't want help, then you needn't follow them.
                            >
                            > HTH.
                            >
                            > --
                            > Brian (remove "invalid" to email me)[/color]


                            Comment

                            • Phillip Parr

                              #15
                              Re: opacity

                              "Mark Tranchant" <mark@tranchant .plus.com> wrote in message
                              news:41aed2f0$0 $9359$ed2619ec@ ptn-nntp-reader02.plus.n et...[color=blue]
                              > Phillip Parr wrote:[color=green]
                              >> 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![/color]
                              >
                              > Because it wasn't a CSS question. See my response in ciwas about
                              > snootiness.
                              >
                              > PS you top-posted again... ;-)
                              >
                              > --
                              > Mark.
                              > http://tranchant.plus.com/[/color]

                              Sorry, it's hard to not top post. I've been doing it with emails all my
                              life, it's hard to suddenly change. And why isn't it a css issue? It's part
                              of the styles isn't it?


                              Comment

                              Working...