From e400e85d280e24c43e21b39210bdcb381fc0e3e0 Mon Sep 17 00:00:00 2001 From: Hemendra Kumar Date: Thu, 6 Jun 2013 20:22:06 +0530 Subject: [PATCH] Update comments.js As of jQuery 1.7, .delegate() has been superseded by the .on() method. updated to .on() method. --- assets/comments.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/comments.js b/assets/comments.js index 103f504..ac950f4 100644 --- a/assets/comments.js +++ b/assets/comments.js @@ -19,7 +19,7 @@ $.fn.commentsList.settings[id] = settings; $.fn.commentsList.initDialog(id); $this - .delegate('.delete', 'click', function(){ + .on('click', '.delete', function(){ var id = $($(this).parents('.comment-widget')[0]).attr("id"); if(confirm($.fn.commentsList.settings[id]['deleteConfirmString'])) { @@ -34,7 +34,7 @@ } return false; }) - .delegate('.approve', 'click', function(){ + .on('click', '.approve', function(){ var id = $($(this).parents('.comment-widget')[0]).attr("id"); if(confirm($.fn.commentsList.settings[id]['deleteConfirmString'])) { @@ -49,7 +49,7 @@ } return false; }) - .delegate('.add-comment', 'click', function(){ + .on('click', '.add-comment', function(){ var id = $($(this).parents('.comment-widget')[0]).attr("id"); $dialog = $("#addCommentDialog-"+id); var commentID = $(this).attr('rel'); @@ -120,4 +120,4 @@ }); } -})(jQuery); \ No newline at end of file +})(jQuery);