On Thursday 08 November 2007 19:06, shapper wrote:
> Hello,
>
> I have an anchor on my page.
> When I click it I want to Toggle the visibility of a Div with ID =
> "Content".

my jQuery foo is lacking, but something along these lines should do it:

$('a.mylink').click(function(){ 
        var visibleState = true; /* uberfoo jquery way of getting visibility 
value */
        $('#content').css("visibility",(visibleState ? "visible" : "hidden"));  
});

> If the div is visible then it should become invisible.
> If it is invisible them it becomes visible.



> How can I do this?
>
> Thanks,
> Miguel

Reply via email to