2012-09-02 31 views
4

我使用Twitter的引導simpleform,我試圖樣式使用數據切換功能,我的單選按鈕,這樣我的按鈕看起來像這裏看到的單選按鈕:如何使用simpleform應用引導程序單選按鈕樣式?

Twitter bootstrap javascript

如何解決我的代碼:

<%= simple_form_for @person , :html => { :class => 'form-horizontal' } do |f| %> 
<%= f.input :name %> 
<%= f.input :password %> 
<%= f.input :country, as: :radio_buttons, :item_wrapper_class => 'btn-group' %> 
<%= f.button :submit %> 
<% end %> 
+0

那你試試?什麼不行? –

回答

0

你有沒有試過下面的代碼片段:

<div class="btn-group" data-toggle="buttons-radio"> 
    <button type="button" class="btn btn-primary">Left</button> 
    <button type="button" class="btn btn-primary">Middle</button> 
    <button type="button" class="btn btn-primary">Right</button> 
</div> 
相關問題