diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-09-09 12:41:21 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-09-09 12:41:21 +0200 |
commit | 9df085e3522c4a8cd037e1145a667056186f5250 (patch) | |
tree | d2c54059a8ec11fecbf03c3171223dc5e97bf3e0 | |
parent | a441a142a5a312025bcc13f4ad783492007e3c20 (diff) | |
download | Ishtar-9df085e3522c4a8cd037e1145a667056186f5250.tar.bz2 Ishtar-9df085e3522c4a8cd037e1145a667056186f5250.zip |
JQuery: live('click') -> on('click')
5 files changed, 10 insertions, 10 deletions
diff --git a/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js b/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js index c151a5e4d..be1faabfe 100644 --- a/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js +++ b/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js @@ -55,7 +55,7 @@ $(function() { $( "#div-{{field_id}}" ).html( data ); }); - $('#id_select_{{field_id}}').live('click', function(){ + $(document).on("click", '#id_select_{{field_id}}', function(){ $('#id_{{field_id}}').val(null); $('#id_select_{{field_id}}').val(null); $.get( {{edit_source}}, function( data ) { diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index b91558194..4d11fcde3 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -56,21 +56,21 @@ $(document).ready(function(){ }) }); -$('#to_bottom_arrow').live('click', function(){ +$(document).on("click", '#to_bottom_arrow', function(){ $("html, body").animate({ scrollTop: $(document).height() }, 1000); }); -$('#to_top_arrow').live('click', function(){ +$(document).on("click", '#to_top_arrow', function(){ $("html, body").animate({ scrollTop: 0}, 1000); }); -$('.check-all').live('click', function(){ +$(document).on("click", '.check-all', function(){ $(this).closest('table' ).find('input:checkbox' ).attr('checked', $(this).is(':checked')); }); -$("#main_menu ul li").live('click', function(){ +$(document).on("click", '#main_menu ul li', function(){ var current_id = $(this).attr('id'); console.log(current_id); $("#main_menu ul ul").not($(this).parents('ul')).not($(this).find('ul') @@ -79,12 +79,12 @@ $("#main_menu ul li").live('click', function(){ }); /* manage help texts */ -$(".help_display").live("click", function(){ +$(document).on("click", '.help_display', function(){ var help_text_id = $(this).attr("href") + "_help"; $(help_text_id).toggle(); }); -$('#progress-content').live('click', function(){ +$(document).on("click", '#progress-content', function(){ $('#progress').hide(); }); diff --git a/ishtar_common/templates/blocks/JQueryAdvancedTown.html b/ishtar_common/templates/blocks/JQueryAdvancedTown.html index 78d2d7831..5df23a1fd 100644 --- a/ishtar_common/templates/blocks/JQueryAdvancedTown.html +++ b/ishtar_common/templates/blocks/JQueryAdvancedTown.html @@ -94,6 +94,6 @@ {% endif %} }); - $('#id_select_{{field_id}}').live('click', empty_town); + $(document).on("click", '#id_select_{{field_id}}', empty_town); });//--></script> diff --git a/ishtar_common/templates/blocks/JQueryAutocomplete.js b/ishtar_common/templates/blocks/JQueryAutocomplete.js index 038acf1ba..8616ff928 100644 --- a/ishtar_common/templates/blocks/JQueryAutocomplete.js +++ b/ishtar_common/templates/blocks/JQueryAutocomplete.js @@ -17,7 +17,7 @@ $("#id_select_{{field_id}}").autocomplete({ {% endif %} }); -$('#id_select_{{field_id}}').live('click', function(){ +$(document).on("click", '#id_select_{{field_id}}', function(){ $('#id_{{field_id}}').val(null); $('#id_select_{{field_id}}').val(null); }); diff --git a/ishtar_common/templates/blocks/JQueryPersonOrganization.js b/ishtar_common/templates/blocks/JQueryPersonOrganization.js index b13a2c28e..8a5937f8c 100644 --- a/ishtar_common/templates/blocks/JQueryPersonOrganization.js +++ b/ishtar_common/templates/blocks/JQueryPersonOrganization.js @@ -22,7 +22,7 @@ $.get( {{edit_source}}{% if selected %}+'{{selected}}'{% endif %}, function( dat $( "#div-{{field_id}}" ).html( data ); }); -$('#id_select_{{field_id}}').live('click', function(){ +$(document).on("click", '#id_select_{{field_id}}', function(){ $('#id_{{field_id}}').val(null); $('#id_select_{{field_id}}').val(null); $.get( {{edit_source}}, function( data ) { |