Radio box value in input textbox

Radio box value in input textbox

Hi;

I have three buttons, i want the content of any clicked button to be shown in the text input as value. Here is a working example  here  but i don't figure to reproduce it in this case especially with div. I am using jQuery 1.9.

Thank you.

The three buttons :
  1. <div id="myradiobutton" class="btn-group" data-toggle="buttons-radio">
  2.     <button type="button" class="btn btn-primary">Left</button>
  3.     <button type="button" class="btn btn-primary">Middle</button>
  4.     <button type="button" class="btn btn-primary">Right</button>
  5. </div>
The input text :
  1. <input id="myinput" type="text"/>