my codes:
.live() is deprecated in jquery1.7+ but .on() does not work well.
Is there a good way to solve the version problem?
$(function(){ var oTable = $('#dyntable').dataTable({ "sPaginationType": "full_numbers", //"bStateSave": true, "aoColumnDefs": [ { "bSortable": false, "bSearchable": false, "aTargets": [0], "sClass": "center", "mRender": function(data, type, full){ return '<input type="checkbox" name="seller[]" value="'+data+'">'; } }, ], "bProcessing":true, "bServerSide": true, "sAjaxSource": "/user/sellerList" }); /// check all $('.stdtable').on("click", '.checkall', function(){ // just work once //$('.stdtable .checkall').live("click", function(){// .live() is deprecated, it work well with jquery1.7.1 $('input', oTable.fnGetNodes()).attr('checked',this.checked); }); })
.live() is deprecated in jquery1.7+ but .on() does not work well.
Is there a good way to solve the version problem?