jQuery toggle div with radio buttons

后端 未结 3 1987
闹比i
闹比i 2020-12-30 05:16

Simple html & jQuery


3条回答
  •  没有蜡笔的小新
    2020-12-30 05:44

    $("input:radio").click(function(){
        $("div").hide();
        var div = "#blk-"+$(this).val();
        $(div).show();
    });
    

    Online demo here: http://jsfiddle.net/yLJPC/

提交回复
热议问题