How to use Bootstrap accordion with a radio button list -


i trying build ui combines html radio button list accordion functionality offered bootstrap's collapse component. goal selecting radio button expands accordion panel below it.

here's jsfiddle demonstrates partially working implementation. unfortunately, although accordion functionality works, radio buttons not selected (apart initial selection, subsequently never changes).

please excuse invalid html in sample. aware input element doesn't have href attribute, don't believe cause of problem.

i have seen this answer similar question, prefer avoid editing bootstrap code , hope there might purely declarative way of making work.

many suggestions, tim

edit: else facing same issue, functionality works out-of-the-box in bootstrap v3.0.

i got work little jquery. jsfiddle

i'm sure there more elegant ways of doing this. works.

$('#collapseone').on('shown', function(){     $('#radio1').prop('checked', true); });  $('#collapsetwo').on('shown', function(){     $('#radio2').prop('checked', true); });  $('#collapsethree').on('shown', function(){     $('#radio3').prop('checked', true); }); 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -