Guys, I just want to chimb in because I'm seeing this being thrown around 
as the answer everywhere.

The problem with this solution is when you want to access the value during 
the onclick event. The problem I've run into, and can't seem to find a 
solution for, is that the "active" class is applied after the click, which 
means if you try to get the element for which the "active" class is 
applied, you'll basically end up with the previously selected value.

Has anyone can find a solution for this?2

On Saturday, March 10, 2012 9:00:28 AM UTC-5, 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