I have this function to open up a DIV to show content when a “read more” link is clicked. I’d like to change the value of “Read More” to “Close” once the DIV has been expanded.
<div class="container">
<p class="expand-text">Read more</p>
<div class="content">
<div class="full-text">
<p>Text content here</p>
</div>
</div>
</div>
<script>
$(".container").click(function() {
$(this).find('.content').slideToggle();
});
</script>
http://jsfiddle.net/mBFzE/