I have a button I'm using with bootstrap.
I'd like to flip the text back and forth with each click. So for example the button' default text would be "Off", you click it, it now shows "On". Click it again and it's "Off" again and so on. Below is my bootrap and jquery code. How would I change this to meet my needs?
<button type="button" id="cmdLargeButton" data-complete-text="On" class="btn btn-primary btn-lg" autocomplete="off">Off</button>
<script>
$('#cmdLargeButton').on('click', function () {
$(this).button('complete')
})
</script>
Also, I can't figure out whey I'm getting this error using the "autocomplete" parameter which the example I saw said I had to use. Not sure what it does. Can someone explain why I'm getting this error?
