javascript - livequery doesn't bind after a DOM insertion -


I do not understand that Livequaar does not bind this phenomenon, but I have to use it. This is just an example that can use .click (), but in the actual code I have been forced to use livequeries. Does anyone know why liveQuality is not working?

  function bind_remove (comment) {var id = comment.attr ('comment_id'); Comment.find ("remove"). Livequery ("click", function (e) {$ .post ("/ deletecomment", {id: id}, function (response) {comment.remove (); comments = comments_container .find ('comment'); });}); } $ (Document) .ready (function () {var comments_container = $ ('# comments_container'); var Comment = comments_container.find ('comment'); comments.each (function () {bind_remove ($ (this) (;);}); $ (". Submit_button"). Livequery ("click", function (e) {$ .post ("/ new comment", {text: textarea.val ()}, function (feedback ) {Comments_container final () .andend ($ (feedback) .Fadeine ('slow', function () {comments = comments_container.find ('comment'); bind_remove (comments.last ());}));} );}};});    

Try changing < Pre> comment.find (".remove"). Livequery ("click", f Function (e) {

with this

  comment.find ("delete."). ("Click", function (e) {< Code>   

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -