2
I’m making the following code:
var botoesTela = "<button id='okcad' class='botao_padrao botao_ok' value='OK' onclick=''> <img src='/php/Images/OK.png' alt='OK' /> OK </button>";
divBotoes.innerHTML = divBotoes.innerHTML + botoesTela;
but when I try to catch the click button in HTML page
$("#okcad").click(function()
he doesn’t do anything...?
Is there an error in the console? When is the click function bind performed? Before or after the Document button is inserted?
– Felipe Fonseca
It may be the order in which things are done. In that case you would need delegate the event.
– bfavaretto