socket.on('find-match', () => {
document.getElementById("find-match").innerHTML = '<button class="btn btn-success" id="find-match-btn">Find Match</button>'
});
$("#find-match-btn").on('click', () => {
console.log('works!');
});
Why do I not get any response when I click the created button? Any help is appreciated!