Код: Выделить всё
$('#submit_search').on('click', function(){
var text = $('#search').val();
$.ajax({
type: 'GET',
url: '/backend/web/sale-order/index',
data: {'text':text},
success: function (data) {
var i;
for(i=0; i<=data.length; i++)
{
$('.block_cheked').append('\<\input type=\'checkbox\'\ id=user_orders data-id='+data[1][i]+'\>'+data[0][i]+'\<br\>');
//console.log(data[0]);
}
}
});
});
$( '#user_orders' ).on( 'click', function() {
if($(this).is(':checked')) {alert('y'); }
else {alert('n');}
});