jQuer - slideToggle() and Toggle Text
Posted
by danit
on Stack Overflow
See other posts from Stack Overflow
or by danit
Published on 2010-04-06T15:36:17Z
Indexed on
2010/04/06
15:43 UTC
Read the original article
Hit count: 149
jQuery
I have a contact form that can be hidden using .slideToggle()
but I want the tab used to Toggle
the form to change text based on wether the form is in view
or hidden
.
Here is the jQuery:
$("#slider").click(function() {
$("#form_wrap").animate({ opacity: 1.0 },200).slideToggle();
});
I want the text of #form_wrap
to read 'Hide' then 'Show'.
Any help appreciated!
© Stack Overflow or respective owner