<b id="info">тут есть текст</b> $('.show').on('click', function() { $.ajax({ type: "post", url: '123', success: function(data) { var json = JSON.parse(data); $('#info').html(json.text+'<button type="button" class="btn btn-success check">кнопка</button>'); } }); }) $('.check').on('click', function() { $.ajax({ type: "post", url: '123', success: function(data) { var json = JSON.parse(data); if(json.check == 'ok'){ location.reload(); } } }); }) I can not figure out why when adding a button to a page, in the future it does not want to work
$('#info').on('click', '.check', function() { ...api.jquery.com/on - Igor