¿De qué forma puedo atar un evento a un elemento recien actualizado con Prototype?
¡
atar evento - Prototype
Iniciado por
Alberto Hernandez
, jun 15 2014 17:19
#1 AUTOR PREGUNTA
Esto también te interesa!
#2
Publicado 16 junio 2014 - 03:27
Si mal no recuerdo puedes utilizar los métodos de behavior.
#3
Publicado 16 junio 2014 - 03:41
Utiliza addBehavior:
Event.addBehavior({
'.todo-done a:click' : function(e) {
var todoId = $(this).readAttribute('href').substr(1);
new Ajax.Updater('todo-list', $.utils.getPath('/todos/ajax_mark/done'), { onComplete: function() {
$.utils.updateList({evalScripts: true});
} }); }); });
#4 AUTOR PREGUNTA
Publicado 16 junio 2014 - 05:09
Gracias Jhony crack