jQuery event on change()

后端 未结 3 1334
离开以前
离开以前 2021-01-25 12:42

I have a simple form:

    
3条回答
  •  旧时难觅i
    2021-01-25 12:50

    First of all the id on the element should be radio10 and not #radio10.

    Then use this code

    $("input[name='color']").change(function () {
        if ($('input#radio10').is(':checked') ) {
                $('.block-cms').show()
                }
            else {
                $('.block-cms').hide();
            }
        }); 
    

提交回复
热议问题