Expandable Section with button text that changes

Hi,
I used the following code in order to expand a section on button click. However I am looking to have the button text change from say “Show more” to “Show less” once clicked. The section with ID expandable and button with ID expandable-trigger-button. Any help is appreciated! Thanks

jQuery(document).ready(function($){
    $('#expandable').slideToggle(0);
    $('#expandable-trigger-button').click(function(event){
		event.preventDefault();
    	$('#expandable').slideToggle( "slow" );
    });
});

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.