From d624f88b2cda6e7132fb85174116afc8e31dad6e Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 19 May 2010 17:05:26 +0900 Subject: [PATCH] Attach .live('click') after .live('submit') so that .live('submit') works on IE with jQuery 1.4.2 --- src/rails.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/rails.js b/src/rails.js index 4e9a8aef..f221f928 100644 --- a/src/rails.js +++ b/src/rails.js @@ -57,18 +57,6 @@ jQuery(function ($) { } }); - /** - * confirmation handler - */ - $('a[data-confirm],input[data-confirm]').live('click', function () { - var el = $(this); - if (el.triggerAndReturn('confirm')) { - if (!confirm(el.attr('data-confirm'))) { - return false; - } - } - }); - /** * remote handlers @@ -102,6 +90,18 @@ jQuery(function ($) { form.submit(); }); + /** + * confirmation handler + */ + $('a[data-confirm],input[data-confirm]').live('click', function () { + var el = $(this); + if (el.triggerAndReturn('confirm')) { + if (!confirm(el.attr('data-confirm'))) { + return false; + } + } + }); + /** * disable-with handlers */