Forum Moderators: open

Message Too Old, No Replies

AnimateOpacity function Cross-browser transparency animation

         

bo_jehos

4:32 pm on Oct 29, 2008 (gmt 0)

10+ Year Member



Hi, I was trying to reproduce the effect which Wesley C posted 7/2007 (under similar subject line).

however, when I cut and paste the javascript function, it didn't work the way I did it. I noted that he said that I should be sure to change the ¦¦ (or) symbols, at the bottom of that post, but I don't know what that means.

Sorry, but I have only rough familiarity with this, so I'm probably missing something obvious.

Fotiman

4:50 pm on Oct 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to WebmasterWorld! Note, this forum replaces the pipe character (typically located above the Enter key on a keyboard by pressing Shift+\) with a character that looks similar but is not the same: ¦

So if you copy the contents of a post from this site and it contains ¦ characters, you need to replace those in with real pipe characters.

bo_jehos

1:38 am on Oct 30, 2008 (gmt 0)

10+ Year Member



Hi, and thank you for the "pipe" character info. That worked.

I still couldn't get the function to work, so here's another rudimentary question:
the original posted code reads like this:

function animateopacity(element, start, end, length, keepBlock, endScript, time)

I would just like to know what the standard syntax is for calling the function, I tried this and it didn't work: onclick="Animateopacity('main_image','','','','','','')

The original posting said to leave the last value (time) as is.

Fotiman

1:34 pm on Oct 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



JavaScript is a case sensitive language. If the function definition is this:

function animateopacity(...)

Then you must call it with a lowercase 'a'. I haven't looked at the original function, but trying to call it with an uppercase 'A' would certainly cause nothing to happen if it was defined with a lowercase 'a'.