HTML:
<a href="#">Show next element</a>
<div>content</div>
jQuery:
$('a').toggle(function () {
$(this).next().show();
},
function () {
$(this).next().hide();
});
How do I change the above jQuery so it also changes the "Show" in the link to "Hide" when the element is visible?
Thanks!