Gadi wrote:

 > I have an effect that I desire to accomplish but I am unsure of just
 > how to accomplish it.  Here is the basic idea of what I am trying to
 > do: Have an unordered list with two list elements.  Upon clicking on a
 > link, I want the list to grow to be 6-10 elements long (the original 2
 > plus 4-8 more), and upon clicking on another link having it shrink
 > back to the original 2 elements.  Actually fiddling with a single UL
 > is not critical, so if there is another way to accomplish this then
 > that would be fine too.

You don't need Scriptaculous for that. Plain old Prototype is enough.

Try something like this:

HTML:
   <ul class="abbreviated" id="myul">
     <li>Whatever 1</li>
     <li>Whatever 2</li>
     <li class="hidden">Whatever 3</li>
     <li class="hidden">Whatever 4</li>
     <li class="hidden">Whatever 5</li>
     <li class="hidden">Whatever 6</li>
     <li class="hidden">Whatever 7</li>
     <li class="hidden">Whatever 8</li>
     <li class="hidden">Whatever 9</li>
     <li class="hidden">Whatever 10</li>
   </ul>

CSS:

   ul.abbreviated li.hidden {
     display: none;
   }

JAVASCRIPT:

   $('myul').onclick = ExpandList;

   function ExpandList() {
     this.toggleClassName('abbreviated');
   }

Just a quick idea. I haven't actually tested it.
But basically it should work.

-- 
Bertilo Wennergren <http://bertilow.com>

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to