have you tried just $("#toggle-content").toggle(); it shows and hide
toggle-content div. otherwise for more option you can use
$("#toggle-content").toggle(function1(){},function2(){}); where
function1 will run when first clicked and function2 the second time.

On Aug 19, 10:44 am, elz64 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I begin  with jQuery so....
>
> looks like one toggle function is missing : how can be accomplished
> the change of a text in a link , (and it's title or a alt text)
> between to possible states :
>
> ie:
> I use this to hide/display a content div a linl and  this :
>
>  $("#toggle-content").click(function(){
>               $("#contenu").toggle();
>               $("#toggle-content").toggleClass("ouvert");
>
> this will add a class to the link #toggle-content to make it "" when
> closed (default) or ".ouvert" when opened.
>
> BUT the link remains the same, and it's actually not very cool or
> accessible to display something like "read more" when it's already
> opened, and the text  should be now  "click here to hide"
>
> Of course, dealing with toggleClass, it's possible to use a full
> graphic background-image that tells the right stuff, but the title AND
> the alt of the link must be change anyway.
>
> any one had already done this ?
> Thank you.

Reply via email to