Friday, 21 November 2014

Example of jquery on & delegate event handler

On
 $('body').on("click","#hcb", function () {
            $("input[name='cb']").attr("checked", this.checked);
        });

Delegate
 $(document).delegate("#ishcb", "click", function () {
            $("input[name='iscb']").attr("checked", this.checked);
        });

No comments:

Post a Comment