I have a working script that toggles my div, and it works great but I can't figure out how to also change the button text when clicked. I need the button text to be "Hide Spreads" when the spread div is shown, and "Show Spreads" when the spread div is not shown.
Script:
$(document).ready(function(){
$(".spread").show();
$(".show_hide").show();
$('.show_hide').click(function(){
$(".spread").toggle();
});
});
Button:
<input type="button" class="show_hide" value="Hide Spreads" />