I am using Twitter Bootstrap to create collapsible sections of text. The sections are expanded when a + button is pressed. My html code as follows:
+
<
You do like this. the function return the old text.
$('button').click(function(){ $(this).text(function(i,old){ return old=='Read More' ? 'Read Less' : 'Read More'; }); });