|
Loading...
|
prototype-scriptaculous@googlegroups.com
[Prev] Thread [Next] | [Prev] Date [Next]
[Proto-Scripty] Re: Trying to toggle the content of elements tirengarfio Fri Jan 29 07:00:24 2010
Hi thanks,
On Jan 29, 2:59 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> then look at Element.update for one possible way to do this with a single DIV.
I tried but i dont know how to do it.
> Another way would be to have two different elements (with distinct
> IDs), and then set them to switch back and forth so only one is ever
> visible at a time.
This worked. Here you have:
<script>
function conmutarContenido(){
$('hola').toggle();
$('adios').toggle();
}
</script>
<div style="display: none" id="hola" >
Hola
</div>
<div id="adios">
Adios
</div>
<div id="link">
<?php //echo link_to_function("Link", "$('test').toggle()") ?>
<a href="#" onclick="conmutarContenido()" >Click here</a>
</div>
> BTW, which PHP framework is this code from?
Why do you ask? because this line?:
<?php //echo link_to_function("Link", "$('test').toggle()") ?>
It's a symfony helper.
Javi
--
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.
- [Proto-Scripty] Trying to toggle the content of elements Javier Garcia 2010/01/29
- Re: [Proto-Scripty] Trying to toggle the content of elements Walter Lee Davis 2010/01/29
- [Proto-Scripty] Re: Trying to toggle the content of elements tirengarfio 2010/01/29 <=