I am trying to swap out button text on click. The function of a button is to toggle a <div>. Is it possible with jQuery to set up two instances of button text and swap them out on toggle?
This is where I am so far:
$('#showmodule').click(function() {
$(this).addClass('active');
$('#module').slideToggle()
});
What I would do in your case, is add spans inside of your anchor link, and toggle those, such as the following.
And the javascript would look something like this.