Try this:

<a href="javascript:;" id="toggleswitch">Toggle Blind</a>

Below goes in a <script> tag in the head

document.observe('dom:loaded', function (){

  $('toggleswitch').observe('click', function () {
    $$('.class2').each(function (d) {
      Effect.toggle(d, 'blind');
    });
  });

});






On Fri, Jun 12, 2009 at 7:47 AM, Gatsman <[email protected]> wrote:

>
> Hi
> is it possible to select a Element by it’s class?
> I want to blind 2 div with one click and id are unique.
>
> for Example:
> <a href="#" onclick="Effect.toggle('class2','BLIND'); return
> false;">Toggle blind</a>
> <div id="d2" class=”class2” style="display:none;"><div>
> <p>text</p>
> </div></div>
>
> Thanks,
> regards John
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to