I am looking to change the content of this span tag:
<span class="ui-btn-text" id="btnText">Read how we have helped</span>
To:
<span class="ui-btn-text" id="btnText">Hide Story</span>
This is what I got so far:
$('#storyBtn').click(function() {
$('#story-body').slideToggle('fast', function() {
$('#btnTextShow').hide();
$('#btnTextHide').show();
});
});
Here is a great example on how to achieve this:
First look at the JSFiddle DEMO
Let’s see what we have here:
And the html:
INFO:
As you can see I simplified and removed all the unnecessary ID’s and codes JUST TO MAKE VISIBLE HOW SIMPLE CAN ALL BE. You can redo this changes of mine.