IIRC, the selected button has the active class set, so you could select the 
selected button with:

$('.btn-group button.active')

and retrieve whatever value you're looking for (I'm guessing text() in the 
example you provide).

On Saturday, March 10, 2012 6:00:28 AM UTC-8, djazzmusic wrote:
>
> noob question really,
>
> but how do I access the value of the selected radio box ?
>
> Im trying to make somethin once you click the compose to pick the value of 
> the radio box.
>
> cheers
>
> ---
>
>  <script type="text/javascript">
> $(document).ready(function(){
>   $("#compose").click(function(){
>     $("#message").html('value of the radio box');
>   });
> });
> </script>
>  
>   </head>
>   <body>
>   
> <div class="container">
> <button id="compose" class="btn">compose</button>
>
> <div id="message">
> </div>
>
>
>    1. <div class="btn-group" data-toggle="buttons-radio">
>    2. <button class="btn">Left</button>
>    3. <button class="btn">Middle</button>
>    4. <button class="btn">Right</button>
>    5. </div>
>
>

Reply via email to