diff options
| author | Jean-Michel Vourgère | 2019-12-23 14:23:12 +0000 |
|---|---|---|
| committer | Robert Treat | 2020-10-07 02:18:30 +0000 |
| commit | bf0572a7d4d31d53cc26cd75e94daf3fbd0d5510 (patch) | |
| tree | bf58caee7da0abe0fd1fbd3264937c5a0b4d07a5 /js/display.js | |
| parent | f28e894fb398558948ec597c667e1110198dbf34 (diff) | |
Adjustements for jquery update
- Replaced .click(function) by .on('click', function)
- Replaced .click() by .trigger('click')
- Replaced .live(event, function) by .on(event, function)
- Replaced $(document).ready(function) by $(function)
- Replaced .bind/.unbind by .on/.off
- Replaced keypress events by keydown events, so that up/down keys get
supported again.
Thanks to the jquery-migrate project.
Diffstat (limited to 'js/display.js')
| -rw-r--r-- | js/display.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/display.js b/js/display.js index bac28ecb..ad27de31 100644 --- a/js/display.js +++ b/js/display.js @@ -1,4 +1,4 @@ -$(document).ready(function() { +$(function() { /* init some needed tags and values */ @@ -9,7 +9,7 @@ $(document).ready(function() { root: $('#root') }; - $("a.fk").live('click', function (event) { + $("a.fk").on('click', function (event) { /* make the cursor being a waiting cursor */ $('body').css('cursor','wait'); @@ -80,7 +80,7 @@ $(document).ready(function() { return false; // do not refresh the page }); - $(".fk_delete").live('click', function (event) { + $(document).on('click', '.fk_delete', function (event) { with($(this).closest('div')) { data('ref').closest('tr').find('a.'+data('refclass')).closest('div').removeClass('highlight'); remove(); |
