I have botões
that are mounted dynamically via jquery
, it happens that on the main page I have events of these botões
, but since they do not exist yet at the time of loading the page the events are not loaded, I needed do something like a refresh on these events as soon as jquery
was loaded.
Code:
Abre Pagina HTML
$(".meusbtns").click(function...);
Monta HTML Basico
Clica numa lista e essa lista traz o result por um jquery
<button class="meusbtns" value="x">Botao</button>
Note that the class meusbtns
exits, but since it came with jquery
the event was not initially loaded.
I know there is a way to add and remove classes, which would reset the event, but since these buttons are dynamic I can not figure out how to do that.
I hope I have been clear