Hi all, I was wondering if someone could tell me why the following is not working, and point me in the right direction. http://www.bambambam.co.uk/index2.html I''m wanting the ''contact'' div to fade out, and then the ''mail'' div to fade back in after a slight delay. Cheers, Ollie Relph. http://www.bambambam.co.uk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Here is the code, for those that don''t wish to visit external links:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>BAMBAMBAM.co.uk - Websites, Flash Portfolios & Corporate
Identities</title>
<!-- Meta -->
<meta http-equiv="content-type" content="text/html;
charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="description" content="BamBamBam.co.uk is the
freelance
design project of Oliver Relph, a student currently studying in
Birmingham, UK. Oliver enjoys creating Websites, Flash Portfolios
& Corporate Identities in particular." />
<meta name="author" content="Oliver Relph" />
<meta name="copyright" content="Oliver Relph" />
<meta name="company" content="Bambambam.co.uk" />
<meta name="revisit-after" content="3 days" />
<!-- Cascading Style Sheets -->
<style title="blue css" media="screen"
type="text/css">
body {
background:url(http://www.bambambam.co.uk/bbb/images/back.gif);
}
p {
font: 11px "Lucida Grande", "Trebuchet MS", Verdana,
sans-serif;
color: #fff;
}
#mail {
position:absolute;
left:50%;
top:300px;
margin-left:-125px;
width:257px;
padding:2px 16px;
background:url(http://www.bambambam.co.uk/bbb/images/b.png) no-
repeat;
}
#message {
height:53px;
width:475px;
background:url(http://www.bambambam.co.uk/bbb/images/details.png) no-
repeat;
}
#image {
position:absolute;
left:50%;
top:100px;
margin-left:-85px;
height:190px;
width:171px;
background:url(http://www.bambambam.co.uk/bbb/images/header.png);
}
#contact {
position:absolute;
left:50%;
top:300px;
margin-left:-52px;
height:33px;
width:105px;
background:url(http://www.bambambam.co.uk/bbb/images/contact_btn.png)
0px 0px no-repeat;
}
#contact:hover {
height:33px;
background-position: 0px -32px;
}
</style>
<!-- JavaScript -->
<script type="text/javascript"
src="http://www.google-analytics.com/
urchin.js"></script>
<script type="text/javascript" language="Javascript"
src="http://
www.bambambam.co.uk/bbb/scripts/prototype.js"></script>
<script type="text/javascript" language="Javascript"
src="http://
www.bambambam.co.uk/bbb/scripts/scriptaculous.js"></script>
<script type="text/javascript" language="Javascript">
function fade() {
Effect.Toggle(''contact'', ''Fade'');
Effect.Toggle(''mail'', ''Fade'');
}
</script>
</head>
<body>
<div id="message"></div>
<div id="image"></div><br />
<div id="mail" style="display:none;">
<form method="post" action="send.php">
<p>Name:</p><input name="name" type="text"
size="30" />
<p>Email:</p><input name="email"
type="text" size="30" />
<p>Subject:</p><input name="subject"
type="text" size="30" />
<p>Message:</p>
<textarea name="msg" cols="27"
rows="6"></textarea><br />
<input type="reset" value="Reset"
/> <input type="submit"
value="Send" />
</form>
</div><br />
<div id="contact" onclick="fade();"></div>
<script type="text/javascript">
_uacct = "UA-365793-1";
urchinTracker();
</script>
</body>
</html>
On May 1, 8:11 pm, ollieR
<ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all,
> I was wondering if someone could tell me why the following is not
> working, and point me in the right direction.
>
> http://www.bambambam.co.uk/index2.html
>
> I''m wanting the ''contact'' div to fade out, and
then the ''mail'' div to
> fade back in after a slight delay.
>
> Cheers,
>
> Ollie Relph.http://www.bambambam.co.uk
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
First of all, the file "effects.js" is not found, and is required for
effects to run properly. If you''re only using that particular
Scriptaculous file (as seems to be the case here), just link to it
directly instead of to "scriptaculous.js"
By default, effects will run in parallel, unless you tell them not
to. (Effect.toggle is scoped by default to be the id of the current
element, which in this case would still leave you with two scoped
queues in parallel.)
You can do it a couple of ways: 1) add a scoped effect queue to the
options, or 2) trigger the second effect call in the onFinish
callback of the first. Either way you''ll need to use the third
parameter of Effect.toggle: the options object.
http://wiki.script.aculo.us/scriptaculous/show/Effect.toggle
http://wiki.script.aculo.us/scriptaculous/show/EffectQueues
The options are the same as for the effect you''re toggling:
http://wiki.script.aculo.us/scriptaculous/show/Effect.appear
Also notice, I replace ''Fade'' with ''appear''.
This code has not been
tested, but should work.
Example (1):
function fade() {
Effect.Toggle(''contact'', ''appear'', {queue:
''myCustomQueue'',
position: ''end''});
Effect.Toggle(''mail'', ''appear'', {queue:
''myCustomQueue'', position:
''end''});
}
Example (2):
function fade() {
Effect.Toggle(''contact'', ''appear'',
{onFinish: function() {
Effect.Toggle(''mail'', ''appear'');
});
}
TAG
On May 1, 2007, at 1:16 PM, ollieR wrote:
> Here is the code, for those that don''t wish to visit external
links:
>
> function fade() {
> Effect.Toggle(''contact'', ''Fade'');
> Effect.Toggle(''mail'', ''Fade'');
> }
>
> On May 1, 8:11 pm, ollieR
<ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> I''m wanting the ''contact'' div to fade out,
and then the ''mail'' div to
>> fade back in after a slight delay.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Hi, thanks for the quick reply. I''ve tried implementing both of these methods on the page, but neither of them appear to be working. :( Cheers, Ollie Relph. http://www.bambambam.co.uk On May 1, 8:43 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> First of all, the file "effects.js" is not found, and is required for > effects to run properly. If you''re only using that particular > Scriptaculous file (as seems to be the case here), just link to it > directly instead of to "scriptaculous.js" > > By default, effects will run in parallel, unless you tell them not > to. (Effect.toggle is scoped by default to be the id of the current > element, which in this case would still leave you with two scoped > queues in parallel.) > > You can do it a couple of ways: 1) add a scoped effect queue to the > options, or 2) trigger the second effect call in the onFinish > callback of the first. Either way you''ll need to use the third > parameter of Effect.toggle: the options object.http://wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp://wiki.script.aculo.us/scriptaculous/show/EffectQueues > > The options are the same as for the effect you''re toggling:http://wiki.script.aculo.us/scriptaculous/show/Effect.appear > > Also notice, I replace ''Fade'' with ''appear''. This code has not been > tested, but should work. > > Example (1): > function fade() { > Effect.Toggle(''contact'', ''appear'', {queue: ''myCustomQueue'', > position: ''end''}); > Effect.Toggle(''mail'', ''appear'', {queue: ''myCustomQueue'', position: > ''end''}); > > } > > Example (2): > function fade() { > Effect.Toggle(''contact'', ''appear'', {onFinish: function() { > Effect.Toggle(''mail'', ''appear''); > }); > > } > > TAG > > On May 1, 2007, at 1:16 PM, ollieR wrote: > > > Here is the code, for those that don''t wish to visit external links: > > > function fade() { > > Effect.Toggle(''contact'', ''Fade''); > > Effect.Toggle(''mail'', ''Fade''); > > } > > > On May 1, 8:11 pm, ollieR <ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I''m wanting the ''contact'' div to fade out, and then the ''mail'' div to > >> fade back in after a slight delay.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, thanks for the quick reply. I''ve tried implementing both of these methods on the page, but neither of them appear to be working. :( Cheers, Ollie Relph. http://www.bambambam.co.uk On May 1, 8:43 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> First of all, the file "effects.js" is not found, and is required for > effects to run properly. If you''re only using that particular > Scriptaculous file (as seems to be the case here), just link to it > directly instead of to "scriptaculous.js" > > By default, effects will run in parallel, unless you tell them not > to. (Effect.toggle is scoped by default to be the id of the current > element, which in this case would still leave you with two scoped > queues in parallel.) > > You can do it a couple of ways: 1) add a scoped effect queue to the > options, or 2) trigger the second effect call in the onFinish > callback of the first. Either way you''ll need to use the third > parameter of Effect.toggle: the options object.http://wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp://wiki.script.aculo.us/scriptaculous/show/EffectQueues > > The options are the same as for the effect you''re toggling:http://wiki.script.aculo.us/scriptaculous/show/Effect.appear > > Also notice, I replace ''Fade'' with ''appear''. This code has not been > tested, but should work. > > Example (1): > function fade() { > Effect.Toggle(''contact'', ''appear'', {queue: ''myCustomQueue'', > position: ''end''}); > Effect.Toggle(''mail'', ''appear'', {queue: ''myCustomQueue'', position: > ''end''}); > > } > > Example (2): > function fade() { > Effect.Toggle(''contact'', ''appear'', {onFinish: function() { > Effect.Toggle(''mail'', ''appear''); > }); > > } > > TAG > > On May 1, 2007, at 1:16 PM, ollieR wrote: > > > Here is the code, for those that don''t wish to visit external links: > > > function fade() { > > Effect.Toggle(''contact'', ''Fade''); > > Effect.Toggle(''mail'', ''Fade''); > > } > > > On May 1, 8:11 pm, ollieR <ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I''m wanting the ''contact'' div to fade out, and then the ''mail'' div to > >> fade back in after a slight delay.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Check your Javascript console. "Error: missing } after property list." Which is correct... in my untested code (below), I left out a closing brace. }}); TAG On May 1, 2007, at 2:02 PM, ollieR wrote:> > Hi, thanks for the quick reply. > > I''ve tried implementing both of these methods on the page, but neither > of them appear to be working. > > :( > > Cheers, > > Ollie Relph. > http://www.bambambam.co.uk > > On May 1, 8:43 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: >> First of all, the file "effects.js" is not found, and is required for >> effects to run properly. If you''re only using that particular >> Scriptaculous file (as seems to be the case here), just link to it >> directly instead of to "scriptaculous.js" >> >> By default, effects will run in parallel, unless you tell them not >> to. (Effect.toggle is scoped by default to be the id of the current >> element, which in this case would still leave you with two scoped >> queues in parallel.) >> >> You can do it a couple of ways: 1) add a scoped effect queue to the >> options, or 2) trigger the second effect call in the onFinish >> callback of the first. Either way you''ll need to use the third >> parameter of Effect.toggle: the options object.http:// >> wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp:// >> wiki.script.aculo.us/scriptaculous/show/EffectQueues >> >> The options are the same as for the effect you''re toggling:http:// >> wiki.script.aculo.us/scriptaculous/show/Effect.appear >> >> Also notice, I replace ''Fade'' with ''appear''. This code has not been >> tested, but should work. >> >> Example (1): >> function fade() { >> Effect.Toggle(''contact'', ''appear'', {queue: ''myCustomQueue'', >> position: ''end''}); >> Effect.Toggle(''mail'', ''appear'', {queue: ''myCustomQueue'', >> position: >> ''end''}); >> >> } >> >> Example (2): >> function fade() { >> Effect.Toggle(''contact'', ''appear'', {onFinish: function() { >> Effect.Toggle(''mail'', ''appear''); >> }); >> >> } >> >> TAG >> >> On May 1, 2007, at 1:16 PM, ollieR wrote: >> >>> Here is the code, for those that don''t wish to visit external links: >> >>> function fade() { >>> Effect.Toggle(''contact'', ''Fade''); >>> Effect.Toggle(''mail'', ''Fade''); >>> } >> >>> On May 1, 8:11 pm, ollieR <ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> I''m wanting the ''contact'' div to fade out, and then the ''mail'' >>>> div to >>>> fade back in after a slight delay. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, thanks for the quick reply. I''ve tried implementing both of these methods on the page, but neither of them appear to be working. :( Cheers, Ollie Relph. http://www.bambambam.co.uk On May 1, 8:43 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> First of all, the file "effects.js" is not found, and is required for > effects to run properly. If you''re only using that particular > Scriptaculous file (as seems to be the case here), just link to it > directly instead of to "scriptaculous.js" > > By default, effects will run in parallel, unless you tell them not > to. (Effect.toggle is scoped by default to be the id of the current > element, which in this case would still leave you with two scoped > queues in parallel.) > > You can do it a couple of ways: 1) add a scoped effect queue to the > options, or 2) trigger the second effect call in the onFinish > callback of the first. Either way you''ll need to use the third > parameter of Effect.toggle: the options object.http://wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp://wiki.script.aculo.us/scriptaculous/show/EffectQueues > > The options are the same as for the effect you''re toggling:http://wiki.script.aculo.us/scriptaculous/show/Effect.appear > > Also notice, I replace ''Fade'' with ''appear''. This code has not been > tested, but should work. > > Example (1): > function fade() { > Effect.Toggle(''contact'', ''appear'', {queue: ''myCustomQueue'', > position: ''end''}); > Effect.Toggle(''mail'', ''appear'', {queue: ''myCustomQueue'', position: > ''end''}); > > } > > Example (2): > function fade() { > Effect.Toggle(''contact'', ''appear'', {onFinish: function() { > Effect.Toggle(''mail'', ''appear''); > }); > > } > > TAG > > On May 1, 2007, at 1:16 PM, ollieR wrote: > > > Here is the code, for those that don''t wish to visit external links: > > > function fade() { > > Effect.Toggle(''contact'', ''Fade''); > > Effect.Toggle(''mail'', ''Fade''); > > } > > > On May 1, 8:11 pm, ollieR <ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I''m wanting the ''contact'' div to fade out, and then the ''mail'' div to > >> fade back in after a slight delay.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
O.K. so no errors this time... but still the effects don''t work :( I have cleared the cache several times, but it doesn''t make a difference. Cheers, Ollie Relph. http://www.bambambam.co.uk On May 1, 9:11 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> Check your Javascript console. > > "Error: missing } after property list." > > Which is correct... in my untested code (below), I left out a closing > brace. > }}); > > TAG > > On May 1, 2007, at 2:02 PM, ollieR wrote: > > > > > Hi, thanks for the quick reply. > > > I''ve tried implementing both of these methods on the page, but neither > > of them appear to be working. > > > :( > > > Cheers, > > > Ollie Relph. > >http://www.bambambam.co.uk > > > On May 1, 8:43 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > >> First of all, the file "effects.js" is not found, and is required for > >> effects to run properly. If you''re only using that particular > >> Scriptaculous file (as seems to be the case here), just link to it > >> directly instead of to "scriptaculous.js" > > >> By default, effects will run in parallel, unless you tell them not > >> to. (Effect.toggle is scoped by default to be the id of the current > >> element, which in this case would still leave you with two scoped > >> queues in parallel.) > > >> You can do it a couple of ways: 1) add a scoped effect queue to the > >> options, or 2) trigger the second effect call in the onFinish > >> callback of the first. Either way you''ll need to use the third > >> parameter of Effect.toggle: the options object.http:// > >> wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp:// > >> wiki.script.aculo.us/scriptaculous/show/EffectQueues > > >> The options are the same as for the effect you''re toggling:http:// > >> wiki.script.aculo.us/scriptaculous/show/Effect.appear > > >> Also notice, I replace ''Fade'' with ''appear''. This code has not been > >> tested, but should work. > > >> Example (1): > >> function fade() { > >> Effect.Toggle(''contact'', ''appear'', {queue: ''myCustomQueue'', > >> position: ''end''}); > >> Effect.Toggle(''mail'', ''appear'', {queue: ''myCustomQueue'', > >> position: > >> ''end''}); > > >> } > > >> Example (2): > >> function fade() { > >> Effect.Toggle(''contact'', ''appear'', {onFinish: function() { > >> Effect.Toggle(''mail'', ''appear''); > >> }); > > >> } > > >> TAG > > >> On May 1, 2007, at 1:16 PM, ollieR wrote: > > >>> Here is the code, for those that don''t wish to visit external links: > > >>> function fade() { > >>> Effect.Toggle(''contact'', ''Fade''); > >>> Effect.Toggle(''mail'', ''Fade''); > >>> } > > >>> On May 1, 8:11 pm, ollieR <ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>> I''m wanting the ''contact'' div to fade out, and then the ''mail'' > >>>> div to > >>>> fade back in after a slight delay.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You still get an error when you click: "Error: Effect.Toggle is not a
function"
After looking at the code I suggested, you''ll need to make two
changes: "Toggle" should not be capitalized, and the callback is
"afterFinish" instead of "onFinish"
(These could have been figured out by checking the documentation I
pointed to.)
Try this:
function fade() {
Effect.toggle(''contact'', ''appear'',
{afterFinish: function() {
Effect.toggle(''mail'',
''appear'');
}});
}
On May 1, 2007, at 2:23 PM, ollieR wrote:
>
> O.K. so no errors this time... but still the effects don''t work :(
>
> I have cleared the cache several times, but it doesn''t make a
> difference.
>
> Cheers,
>
> Ollie Relph.
> http://www.bambambam.co.uk
>
> On May 1, 9:11 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org>
wrote:
>> Check your Javascript console.
>>
>> "Error: missing } after property list."
>>
>> Which is correct... in my untested code (below), I left out a closing
>> brace.
>> }});
>>
>> TAG
>>
>> On May 1, 2007, at 2:02 PM, ollieR wrote:
>>
>>
>>
>>> Hi, thanks for the quick reply.
>>
>>> I''ve tried implementing both of these methods on the page,
but
>>> neither
>>> of them appear to be working.
>>
>>> :(
>>
>>> Cheers,
>>
>>> Ollie Relph.
>>> http://www.bambambam.co.uk
>>
>>> On May 1, 8:43 pm, Tom Gregory
<t...-PGZyUNKar/Q@public.gmane.org> wrote:
>>>> First of all, the file "effects.js" is not found, and
is
>>>> required for
>>>> effects to run properly. If you''re only using that
particular
>>>> Scriptaculous file (as seems to be the case here), just link to
it
>>>> directly instead of to "scriptaculous.js"
>>
>>>> By default, effects will run in parallel, unless you tell them
not
>>>> to. (Effect.toggle is scoped by default to be the id of the
current
>>>> element, which in this case would still leave you with two
scoped
>>>> queues in parallel.)
>>
>>>> You can do it a couple of ways: 1) add a scoped effect queue
to
>>>> the
>>>> options, or 2) trigger the second effect call in the onFinish
>>>> callback of the first. Either way you''ll need to use
the third
>>>> parameter of Effect.toggle: the options object.http://
>>>> wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp://
>>>> wiki.script.aculo.us/scriptaculous/show/EffectQueues
>>
>>>> The options are the same as for the effect you''re
toggling:http://
>>>> wiki.script.aculo.us/scriptaculous/show/Effect.appear
>>
>>>> Also notice, I replace ''Fade'' with
''appear''. This code has not been
>>>> tested, but should work.
>>
>>>> Example (1):
>>>> function fade() {
>>>> Effect.Toggle(''contact'',
''appear'', {queue: ''myCustomQueue'',
>>>> position: ''end''});
>>>> Effect.Toggle(''mail'',
''appear'', {queue: ''myCustomQueue'',
>>>> position:
>>>> ''end''});
>>
>>>> }
>>
>>>> Example (2):
>>>> function fade() {
>>>> Effect.Toggle(''contact'',
''appear'', {onFinish: function() {
>>>> Effect.Toggle(''mail'',
''appear'');
>>>> });
>>
>>>> }
>>
>>>> TAG
>>
>>>> On May 1, 2007, at 1:16 PM, ollieR wrote:
>>
>>>>> Here is the code, for those that don''t wish to
visit external
>>>>> links:
>>
>>>>> function fade() {
>>>>> Effect.Toggle(''contact'',
''Fade'');
>>>>> Effect.Toggle(''mail'',
''Fade'');
>>>>> }
>>
>>>>> On May 1, 8:11 pm, ollieR
<ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>> I''m wanting the ''contact''
div to fade out, and then the ''mail''
>>>>>> div to
>>>>>> fade back in after a slight delay.
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
sorry, i assumed that your code was correct. in the effect documentation, it suggests the use of two sets of <div>s I havenow implemented this. but for some reason, it still wont work. Thanks for all the help on this, but i think perhaps i should find another way of creating this effect. On May 1, 9:37 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> You still get an error when you click: "Error: Effect.Toggle is not a > function" > > After looking at the code I suggested, you''ll need to make two > changes: "Toggle" should not be capitalized, and the callback is > "afterFinish" instead of "onFinish" > (These could have been figured out by checking the documentation I > pointed to.) > > Try this: > function fade() { > Effect.toggle(''contact'', ''appear'', {afterFinish: function() { > Effect.toggle(''mail'', ''appear''); > }}); > > } > > On May 1, 2007, at 2:23 PM, ollieR wrote: > > > > > O.K. so no errors this time... but still the effects don''t work :( > > > I have cleared the cache several times, but it doesn''t make a > > difference. > > > Cheers, > > > Ollie Relph. > >http://www.bambambam.co.uk > > > On May 1, 9:11 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > >> Check your Javascript console. > > >> "Error: missing } after property list." > > >> Which is correct... in my untested code (below), I left out a closing > >> brace. > >> }}); > > >> TAG > > >> On May 1, 2007, at 2:02 PM, ollieR wrote: > > >>> Hi, thanks for the quick reply. > > >>> I''ve tried implementing both of these methods on the page, but > >>> neither > >>> of them appear to be working. > > >>> :( > > >>> Cheers, > > >>> Ollie Relph. > >>>http://www.bambambam.co.uk > > >>> On May 1, 8:43 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > >>>> First of all, the file "effects.js" is not found, and is > >>>> required for > >>>> effects to run properly. If you''re only using that particular > >>>> Scriptaculous file (as seems to be the case here), just link to it > >>>> directly instead of to "scriptaculous.js" > > >>>> By default, effects will run in parallel, unless you tell them not > >>>> to. (Effect.toggle is scoped by default to be the id of the current > >>>> element, which in this case would still leave you with two scoped > >>>> queues in parallel.) > > >>>> You can do it a couple of ways: 1) add a scoped effect queue to > >>>> the > >>>> options, or 2) trigger the second effect call in the onFinish > >>>> callback of the first. Either way you''ll need to use the third > >>>> parameter of Effect.toggle: the options object.http:// > >>>> wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp:// > >>>> wiki.script.aculo.us/scriptaculous/show/EffectQueues > > >>>> The options are the same as for the effect you''re toggling:http:// > >>>> wiki.script.aculo.us/scriptaculous/show/Effect.appear > > >>>> Also notice, I replace ''Fade'' with ''appear''. This code has not been > >>>> tested, but should work. > > >>>> Example (1): > >>>> function fade() { > >>>> Effect.Toggle(''contact'', ''appear'', {queue: ''myCustomQueue'', > >>>> position: ''end''}); > >>>> Effect.Toggle(''mail'', ''appear'', {queue: ''myCustomQueue'', > >>>> position: > >>>> ''end''}); > > >>>> } > > >>>> Example (2): > >>>> function fade() { > >>>> Effect.Toggle(''contact'', ''appear'', {onFinish: function() { > >>>> Effect.Toggle(''mail'', ''appear''); > >>>> }); > > >>>> } > > >>>> TAG > > >>>> On May 1, 2007, at 1:16 PM, ollieR wrote: > > >>>>> Here is the code, for those that don''t wish to visit external > >>>>> links: > > >>>>> function fade() { > >>>>> Effect.Toggle(''contact'', ''Fade''); > >>>>> Effect.Toggle(''mail'', ''Fade''); > >>>>> } > > >>>>> On May 1, 8:11 pm, ollieR <ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>>>> I''m wanting the ''contact'' div to fade out, and then the ''mail'' > >>>>>> div to > >>>>>> fade back in after a slight delay.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
May I suggest you learn to use Firebug? http://www.getfirebug.com/
It looks like your prototype version may be a bit too far ahead of
your scriptaculous version.
Use the version of prototype that ships with scriptaculous.
For those playing along at home: "Error: too much recursion.
Prototype.js, line 1317"
From prototype.js [1.5.1_rc4] (per firebug):
Element.extend.cache = {
findOrStore: function(value) {
return this[value] = this[value] || function() {
return value.apply(null, [this].concat($A(arguments))); //
<-- this line here
}
}
};
TAG
On May 1, 2007, at 2:57 PM, ollieR wrote:
>
> sorry, i assumed that your code was correct.
>
> in the effect documentation, it suggests the use of two sets of
<div>s
> I havenow implemented this. but for some reason, it still wont work.
>
> Thanks for all the help on this, but i think perhaps i should find
> another way of creating this effect.
>
> On May 1, 9:37 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org>
wrote:
>> You still get an error when you click: "Error: Effect.Toggle is
not a
>> function"
>>
>> After looking at the code I suggested, you''ll need to make two
>> changes: "Toggle" should not be capitalized, and the callback
is
>> "afterFinish" instead of "onFinish"
>> (These could have been figured out by checking the documentation I
>> pointed to.)
>>
>> Try this:
>> function fade() {
>> Effect.toggle(''contact'',
''appear'', {afterFinish: function
>> () {
>> Effect.toggle(''mail'',
''appear'');
>> }});
>>
>> }
>>
>> On May 1, 2007, at 2:23 PM, ollieR wrote:
>>
>>
>>
>>> O.K. so no errors this time... but still the effects don''t
work :(
>>
>>> I have cleared the cache several times, but it doesn''t
make a
>>> difference.
>>
>>> Cheers,
>>
>>> Ollie Relph.
>>> http://www.bambambam.co.uk
>>
>>> On May 1, 9:11 pm, Tom Gregory
<t...-PGZyUNKar/Q@public.gmane.org> wrote:
>>>> Check your Javascript console.
>>
>>>> "Error: missing } after property list."
>>
>>>> Which is correct... in my untested code (below), I left out a
>>>> closing
>>>> brace.
>>>> }});
>>
>>>> TAG
>>
>>>> On May 1, 2007, at 2:02 PM, ollieR wrote:
>>
>>>>> Hi, thanks for the quick reply.
>>
>>>>> I''ve tried implementing both of these methods on
the page, but
>>>>> neither
>>>>> of them appear to be working.
>>
>>>>> :(
>>
>>>>> Cheers,
>>
>>>>> Ollie Relph.
>>>>> http://www.bambambam.co.uk
>>
>>>>> On May 1, 8:43 pm, Tom Gregory
<t...-PGZyUNKar/Q@public.gmane.org> wrote:
>>>>>> First of all, the file "effects.js" is not
found, and is
>>>>>> required for
>>>>>> effects to run properly. If you''re only using
that particular
>>>>>> Scriptaculous file (as seems to be the case here), just
link
>>>>>> to it
>>>>>> directly instead of to "scriptaculous.js"
>>
>>>>>> By default, effects will run in parallel, unless you
tell them
>>>>>> not
>>>>>> to. (Effect.toggle is scoped by default to be the id of
the
>>>>>> current
>>>>>> element, which in this case would still leave you with
two scoped
>>>>>> queues in parallel.)
>>
>>>>>> You can do it a couple of ways: 1) add a scoped effect
queue to
>>>>>> the
>>>>>> options, or 2) trigger the second effect call in the
onFinish
>>>>>> callback of the first. Either way you''ll need
to use the third
>>>>>> parameter of Effect.toggle: the options object.http://
>>>>>>
wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp://
>>>>>> wiki.script.aculo.us/scriptaculous/show/EffectQueues
>>
>>>>>> The options are the same as for the effect
you''re
>>>>>> toggling:http://
>>>>>> wiki.script.aculo.us/scriptaculous/show/Effect.appear
>>
>>>>>> Also notice, I replace ''Fade'' with
''appear''. This code has not
>>>>>> been
>>>>>> tested, but should work.
>>
>>>>>> Example (1):
>>>>>> function fade() {
>>>>>> Effect.Toggle(''contact'',
''appear'', {queue:
>>>>>> ''myCustomQueue'',
>>>>>> position: ''end''});
>>>>>> Effect.Toggle(''mail'',
''appear'', {queue: ''myCustomQueue'',
>>>>>> position:
>>>>>> ''end''});
>>
>>>>>> }
>>
>>>>>> Example (2):
>>>>>> function fade() {
>>>>>> Effect.Toggle(''contact'',
''appear'', {onFinish: function
>>>>>> () {
>>>>>> Effect.Toggle(''mail'',
''appear'');
>>>>>> });
>>
>>>>>> }
>>
>>>>>> TAG
>>
>>>>>> On May 1, 2007, at 1:16 PM, ollieR wrote:
>>
>>>>>>> Here is the code, for those that don''t
wish to visit external
>>>>>>> links:
>>
>>>>>>> function fade() {
>>>>>>> Effect.Toggle(''contact'',
''Fade'');
>>>>>>> Effect.Toggle(''mail'',
''Fade'');
>>>>>>> }
>>
>>>>>>> On May 1, 8:11 pm, ollieR
<ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>> I''m wanting the
''contact'' div to fade out, and then the
''mail''
>>>>>>>> div to
>>>>>>>> fade back in after a slight delay.
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
oops, i forgot to upload the corresponding prototype. Thanks for the help, it works :) On May 1, 10:09 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> May I suggest you learn to use Firebug?http://www.getfirebug.com/ > > It looks like your prototype version may be a bit too far ahead of > your scriptaculous version. > > Use the version of prototype that ships with scriptaculous. > > For those playing along at home: "Error: too much recursion. > Prototype.js, line 1317" > > From prototype.js [1.5.1_rc4] (per firebug): > Element.extend.cache = { > findOrStore: function(value) { > return this[value] = this[value] || function() { > return value.apply(null, [this].concat($A(arguments))); // > <-- this line here > } > } > > }; > > TAG > > On May 1, 2007, at 2:57 PM, ollieR wrote: > > > > > sorry, i assumed that your code was correct. > > > in the effect documentation, it suggests the use of two sets of <div>s > > I havenow implemented this. but for some reason, it still wont work. > > > Thanks for all the help on this, but i think perhaps i should find > > another way of creating this effect. > > > On May 1, 9:37 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > >> You still get an error when you click: "Error: Effect.Toggle is not a > >> function" > > >> After looking at the code I suggested, you''ll need to make two > >> changes: "Toggle" should not be capitalized, and the callback is > >> "afterFinish" instead of "onFinish" > >> (These could have been figured out by checking the documentation I > >> pointed to.) > > >> Try this: > >> function fade() { > >> Effect.toggle(''contact'', ''appear'', {afterFinish: function > >> () { > >> Effect.toggle(''mail'', ''appear''); > >> }}); > > >> } > > >> On May 1, 2007, at 2:23 PM, ollieR wrote: > > >>> O.K. so no errors this time... but still the effects don''t work :( > > >>> I have cleared the cache several times, but it doesn''t make a > >>> difference. > > >>> Cheers, > > >>> Ollie Relph. > >>>http://www.bambambam.co.uk > > >>> On May 1, 9:11 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > >>>> Check your Javascript console. > > >>>> "Error: missing } after property list." > > >>>> Which is correct... in my untested code (below), I left out a > >>>> closing > >>>> brace. > >>>> }}); > > >>>> TAG > > >>>> On May 1, 2007, at 2:02 PM, ollieR wrote: > > >>>>> Hi, thanks for the quick reply. > > >>>>> I''ve tried implementing both of these methods on the page, but > >>>>> neither > >>>>> of them appear to be working. > > >>>>> :( > > >>>>> Cheers, > > >>>>> Ollie Relph. > >>>>>http://www.bambambam.co.uk > > >>>>> On May 1, 8:43 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > >>>>>> First of all, the file "effects.js" is not found, and is > >>>>>> required for > >>>>>> effects to run properly. If you''re only using that particular > >>>>>> Scriptaculous file (as seems to be the case here), just link > >>>>>> to it > >>>>>> directly instead of to "scriptaculous.js" > > >>>>>> By default, effects will run in parallel, unless you tell them > >>>>>> not > >>>>>> to. (Effect.toggle is scoped by default to be the id of the > >>>>>> current > >>>>>> element, which in this case would still leave you with two scoped > >>>>>> queues in parallel.) > > >>>>>> You can do it a couple of ways: 1) add a scoped effect queue to > >>>>>> the > >>>>>> options, or 2) trigger the second effect call in the onFinish > >>>>>> callback of the first. Either way you''ll need to use the third > >>>>>> parameter of Effect.toggle: the options object.http:// > >>>>>> wiki.script.aculo.us/scriptaculous/show/Effect.togglehttp:// > >>>>>> wiki.script.aculo.us/scriptaculous/show/EffectQueues > > >>>>>> The options are the same as for the effect you''re > >>>>>> toggling:http:// > >>>>>> wiki.script.aculo.us/scriptaculous/show/Effect.appear > > >>>>>> Also notice, I replace ''Fade'' with ''appear''. This code has not > >>>>>> been > >>>>>> tested, but should work. > > >>>>>> Example (1): > >>>>>> function fade() { > >>>>>> Effect.Toggle(''contact'', ''appear'', {queue: > >>>>>> ''myCustomQueue'', > >>>>>> position: ''end''}); > >>>>>> Effect.Toggle(''mail'', ''appear'', {queue: ''myCustomQueue'', > >>>>>> position: > >>>>>> ''end''}); > > >>>>>> } > > >>>>>> Example (2): > >>>>>> function fade() { > >>>>>> Effect.Toggle(''contact'', ''appear'', {onFinish: function > >>>>>> () { > >>>>>> Effect.Toggle(''mail'', ''appear''); > >>>>>> }); > > >>>>>> } > > >>>>>> TAG > > >>>>>> On May 1, 2007, at 1:16 PM, ollieR wrote: > > >>>>>>> Here is the code, for those that don''t wish to visit external > >>>>>>> links: > > >>>>>>> function fade() { > >>>>>>> Effect.Toggle(''contact'', ''Fade''); > >>>>>>> Effect.Toggle(''mail'', ''Fade''); > >>>>>>> } > > >>>>>>> On May 1, 8:11 pm, ollieR <ollie.re...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>>>>>> I''m wanting the ''contact'' div to fade out, and then the ''mail'' > >>>>>>>> div to > >>>>>>>> fade back in after a slight delay.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---