I have a problem when using bootstrap in my code. I want the value from my btn-radio, but I cannot find out how to do it.
<label>Status</label>
<div class="btn-group" id="filterProductStatus" data-toggle="buttons-radio">
<button class="btn active">All</button>
<button class="btn">Online</button>
<button class="btn">Offline</button>
</div>
I want to get the value of the preset button and later the selected button; can someonne help me?
The accepted answer won't work as you need to select a child button, not the part div. I think you'll find this works:
$('#filterProductStatus > button.active').text()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With