diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2014-12-02 15:37:58 +0300 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2014-12-02 15:37:58 +0300 |
commit | d03c3adff44ab11818023d3f6ba1419b8fcd11b6 (patch) | |
tree | eb0f530f9b5d962c8fa8cfba7902f7208bed184f /js/gis_data_editor.js | |
parent | 410d1c32df612e2ebd35bb3c604d2ee54a29c59c (diff) |
More instances of .live() and .die() replaced with .on() and .off()
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/gis_data_editor.js')
-rw-r--r-- | js/gis_data_editor.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 9c014d67c6..0fb39d7a75 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -212,7 +212,7 @@ function insertDataAndClose() { AJAX.registerTeardown('gis_data_editor.js', function () { $(document).off('click', "#gis_editor input[name='gis_data[save]']"); $(document).off('submit', '#gis_editor'); - $('#gis_editor').find("input[type='text']").die('change'); + $(document).off('change', "#gis_editor input[type='text']"); $(document).off('change', "#gis_editor select.gis_type"); $(document).off('click', '#gis_editor a.close_gis_editor, #gis_editor a.cancel_gis_editor'); $(document).off('click', '#gis_editor a.addJs.addPoint'); @@ -245,7 +245,7 @@ AJAX.registerOnload('gis_data_editor.js', function () { /** * Trigger asynchronous calls on data change and update the output. */ - $('#gis_editor').find("input[type='text']").live('change', function () { + $(document).on('change', "#gis_editor input[type='text']", function () { var $form = $('form#gis_data_editor_form'); $.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function (data) { if (typeof data !== 'undefined' && data.success === true) { |