I''m trying to use scriptaculous to create a simple show/hide menu with
the headers of each part staying visible and using the Effect.toggle
to show and hide the text descriptions below each header.
All seemed to be working well but I keep getting an error saying
from: effects.js (line 568)
element has no properties
from: (element.getStyle(''display'') == ''none''
? 0.0 :
element.getOpacity() || 0.0),
this is withing the Effect.appear function
565 Effect.Appear = function(element) {
566 element = $(element);
567 var options = Object.extend({
568 from: (element.getStyle(''display'') ==
''none'' ? 0.0 :
element.getOpacity() || 0.0),
569 to: 1.0,
570 // force Safari to render floated elements properly
571 afterFinishInternal: function(effect) {
572 effect.element.forceRerendering();
573 },
574 beforeSetup: function(effect) {
575 effect.element.setOpacity(effect.options.from).show();
576 }}, arguments[1] || {});
577 return new Effect.Opacity(element,options);
578 }
I''m struggling to work out why this is happening. The code I''m
using
is:
<script src="Scriptaculous/prototype.js"
type="text/javascript"></
script>
<script src="Scriptaculous/scriptaculous.js"
type="text/javascript"></
script>
<link href="HowWeWork/InfoPage.css" rel="stylesheet"
type="text/css" />
<body>
<script type="text/javascript" language="javascript">
// <![CDATA[
Effect.Appear(''element_id'');
// ]]>
</script>
<div class="info_Page">
<a href="#"
onclick="Effect.toggle(''hidden_content1'',''blind'');
return
false"><H2>Deciding what vehicle you want </H2></a>
<div id="hidden_content1"
style="display:none"><span
class="hidden_stuff">
<p>Some Text Here.</p>
<p>Some More Text Here</p>
<dl>
<dt>What you need</dt>
<dd>What you need to carry</dd>
<dd>What you''ll be doing</dd>
</dl>
</span>
</div>
<a href="#"
onclick="Effect.toggle(''hidden_content2'',''blind'');
return
false"><h2>Part Exchanging a Vehicle</h2></a>
<div id="hidden_content2" style="display:none">
<span class="hidden_stuff">
<ul class="docs">
<li><img src="Image-2.jpg" width="150"
height="200" class="doc_img" /></li>
<li>View Example</li>
</ul>
<p>Some Text</p>
<dl>
<dt>Another List</dt>
<dd>more stuff</dd>
</dl>
<p>Another Paragraph</p>
</span>
</div>
</div>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---