jquery - Ruby On Rails : how to show/hide related div of radio buttons is checked -
i trying using jquery, not able proceed. please me.
radio_button_tag(:radio_btn, 1, true)=> if checked div -- 'abc' show else hide() <div id= "abc"> "abc executing" </div> radio_button_tag(:radio_btn, 0)=> if checked div -- 'xyz' show else hide() <div id= "xyz"> "xyz executing" </div>
basically with:
$("input[type=radio]").change(function(e){ // or whatever selector want // want $(e.currenttarget) });
made simple fiddle demonstrate behavior.
Comments
Post a Comment