mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Merge pull request #8034 from Matt-Yorkley/live
Fix deprecated syntax for live() function
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
:javascript
|
||||
var properties = #{raw(@properties.to_json)};
|
||||
|
||||
$("#producer_properties input.autocomplete").live("keydown", function() {
|
||||
already_auto_completed = $(this).is('ac_input');
|
||||
$("#producer_properties").on("keydown", "input.autocomplete", function() {
|
||||
var already_auto_completed = $(this).is('ac_input');
|
||||
if (!already_auto_completed) {
|
||||
$(this).autocomplete({source: properties});
|
||||
$(this).focus();
|
||||
|
||||
@@ -61,8 +61,9 @@
|
||||
|
||||
:javascript
|
||||
var properties = #{raw(@properties.to_json)};
|
||||
$("#product_properties input.autocomplete").live("keydown", function(){
|
||||
already_auto_completed = $(this).is('ac_input');
|
||||
|
||||
$("#product_properties").on("keydown", "input.autocomplete", function(){
|
||||
var already_auto_completed = $(this).is('ac_input');
|
||||
if (!already_auto_completed) {
|
||||
$(this).autocomplete({source: properties});
|
||||
$(this).focus();
|
||||
|
||||
Reference in New Issue
Block a user