using toggle to change button value
Hello I have the following:
</div><input id="button" type="button" value="Hide Buttons" /> </div>
- $('document').ready(function(){
- $("#button").on('click', function(){
- $(this).val('Show Buttons');
- event.stopPropagation();
- $("#thumbs").toggle();
- $("#insideholder").toggle();
- $("#buttonsH").toggle();
- });
After the initial click everything disappears as It should and with another click it reappears again so that toggle is working fine. I cannot figure out how to toggle the button value though. After the first click the button value goes to 'show buttons' and does not toggle back.
I've tried a few different things all to no success so I'm open to suggestions. Thanks