Replace $.live with $.on

This is needed for jQuery >= 1.9 compatibility and is compatible with
JQuery >= 1.7 (Plone 4.3 onwards).
This commit is contained in:
Gaudenz Steinlin
2014-03-14 16:51:57 +01:00
committed by Gaudenz Steinlin
parent f58e900e25
commit fa17c51a7b
3 changed files with 7 additions and 3 deletions
@@ -143,7 +143,7 @@
/**********************************************************************
* Publish a single comment.
**********************************************************************/
$("input[name='form.button.PublishComment']").live('click', function () {
$("input[name='form.button.PublishComment']").on('click', function () {
var trigger = this;
var form = $(this).parents("form");
var data = $(form).serialize();
@@ -169,7 +169,7 @@
/**********************************************************************
* Delete a comment and its answers.
**********************************************************************/
$("input[name='form.button.DeleteComment']").live('click', function () {
$("input[name='form.button.DeleteComment']").on('click', function () {
var trigger = this;
var form = $(this).parents("form");
var data = $(form).serialize();