$(function () {
    $("#fangan :radio[name='price']").bind('click', function (event) {
        //$(this).next().attr("class", "on");
        $("input[name='price']").each(function () {
            //这里是查找name=checkday的选框并遍历  当然你也可以直接用 $("input:radio")

            if ($(this).attr("checked") == "checked") {
                //这里是判断是否被选中  
                $(this).next().attr("class", "on")
            }
            else {
                $(this).next().attr("class", "hide")
            }
        })
    })
    $("#fangan :radio[name='num']").bind('click', function (event) {
        //$(this).next().attr("class", "on");
        $("input[name='num']").each(function () {
            //这里是查找name=checkday的选框并遍历  当然你也可以直接用 $("input:radio")

            if ($(this).attr("checked") == "checked") {
                //这里是判断是否被选中  
                $(this).next().attr("class", "on")
            }
            else {
                $(this).next().attr("class", "hide")
            }
        })
    })
    $("#fangan :checkbox[name='model[]']").bind('click', function (event) {
        //$(this).next().attr("class", "on");
        $("input[name='model[]']").each(function () {
            //这里是查找name=checkday的选框并遍历  当然你也可以直接用 $("input:radio")

            if ($(this).attr("checked") == "checked") {
                //这里是判断是否被选中  
                $(this).next().attr("class", "on")
            }
            else {
                $(this).next().attr("class", "hide")
            }
        })
    })
    $("#fangan :checkbox[name='color[]']").bind('click', function (event) {
        //$(this).next().attr("class", "on");
        $("input[name='color[]']").each(function () {
            //这里是查找name=checkday的选框并遍历  当然你也可以直接用 $("input:radio")

            if ($(this).attr("checked") == "checked") {
                //这里是判断是否被选中  
                $(this).next().attr("class", "on")
            }
            else {
                $(this).next().attr("class", "hide")
            }
        })
    })
})

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案