onclick for Bootstrap .btn-group checkbox works in JSFiddle but not browser

前端 未结 2 935
醉梦人生
醉梦人生 2021-01-26 09:07

The form below contains a Bootstrap toggle button group that uses checkboxes. I need to listen for click events on the checkbox inputs.



        
2条回答
  •  遥遥无期
    2021-01-26 09:10

    I can't explain why it is working in JSFiddle, however it looks like the checkbox is essentially hiding behind the button. Are you going to be submitting this form, or just doing some jquery to the page based on selection? If it were me and you want to keep the buttons you can do this:

提交回复
热议问题