got now the following code:
<a href="#" onclick="Element.show('desc1'); Element.hide('desc2');
Element.hide('desc3'); return false;"><img .. /></a>
<a href="#" onclick="Element.show('desc2'); Element.hide('desc1');
Element.hide('desc3'); return false;"><img .. /></a>
<a href="#" onclick="Element.show('desc3'); Element.hide('desc1');
Element.hide('desc2'); return false;"><img .. /></a>

works well. just one problem to solve. i have about 20 images and 20
divs with different descriptions. i dont want to hide each div by hand
"Element.hide('desc2'); ...". how can i hide all other divs at the
same time? can anyone help me?

On 25 Mrz., 10:44, dven <[EMAIL PROTECTED]> wrote:
> thanks. i tried this:
> <a href="#" onclick="Element.toggle('desc1'); return
> false;"><img .... /></a>
> <a href="#" onclick="Element.toggle('desc2'); return
> false;"><img .... /></a>
>
> and:
> <p id="desc1" style="display:none;">...</p>
> <p id="desc2" style="display:none;">...</p>
>
> it works but i want the images to toogle each other. i want to see
> just one description, not both if i click both images.
> and i want a little fade is this possible?
>
> On 21 Mrz., 06:07, "David Lam" <[EMAIL PROTECTED]> wrote:
>
> > dunno how you are building the page, but you can add an onclick attribute on
> > each of those img tags...
>
> > maybe something like, onclick="$('ID_OF_DIV_BELOW_SLIDE').innerHTML =
> > 'the_text_you_want_to_put_in"
>
> > oh if you want to hide/show divs in lieu of the above you could just do some
> > $(id).show()'s and $(id).hide()'s i guess... =\
>
> > On Thu, Mar 20, 2008 at 6:20 AM, dven <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > i use the following script to show my portfolio/references:
> > >http://194.95.111.244/~countzero/scripts/_myImageFlowLightbox2/<http://194.95.111.244/%7Ecountzero/scripts/_myImageFlowLightbox2/>
> > > Its based on prototype and scriptaculous.
>
> > > My problem: i want to add more information to each image, maybe about
> > > 3-5 sentences.
> > > My question: is it possible to change the content below the slide each
> > > time i click on a image?
> > > My idea: hide and show different div's each click on a image.
>
> > > Is this possible? And how can i do this? I'm not a java coder, have
> > > just skills in html/css.
>
> > > Regards,
> > > dven
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
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