[jQuery] toogle a layer but change the link

[jQuery] toogle a layer but change the link

Here's my problem:
I want to add a layer to my site which can be shown or hidden via a
link. So far so good.
My problem is that I need to have the link which toggles the layer to
be changed.
When the layer is hidden the link should be like:
<a href="#" class="toogle">Show layer</a>
when the layer is shown it should be:
<a href="#" class="toogle">Hide layer</a>
Is that possible to do? My current code looks like this:
$("a.toggle").click(function() { $("#infoLayer").toggle();});
Thank you very much,
- Dominik
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/