简体   繁体   中英

How to convert working jquery 1.7.2 code into jquery 1.3.2

The below code works fine in jquery 1.7.2 but does not in jquery 1.3.2

$(".selectallItem8CheckBox").click(function () {
        $(".checkboxItem8select").prop("checked", $(".selectallItem8CheckBox").prop("checked"))
    });

Alternative to this would help. Thanks in advance

对于jQuery 1.5及更低版本,请使用.attr()而不是.prop()

$('.checkboxItem8select').attr('checked',$(".selectallItem8CheckBox").attr("checked"));

.prop() wasn't added til 1.6. Use .attr() instead

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM