Skip to content

Commit

Permalink
Bug fix: Event lookup referenced post lookup instead
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 13, 2025
1 parent 6de4b0f commit d0452c5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/js/jquery.functions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function ($) {
$(function () {
$('.suggest').autocomplete({
$('#mt-required .suggest').autocomplete({
minLength: 3,
source: function (req, response) {
$.getJSON(ajaxurl + '?callback=?&action=' + mtAjax.action, req, response);
Expand All @@ -13,5 +13,18 @@
}
}
);
$('.mt-move-tickets-target.suggest').autocomplete({
minLength: 3,
source: function (req, response) {
$.getJSON(ajaxurl + '?callback=?&action=' + mtAjax.action, req, response);
},
select: function (event, ui) {
var label = $(this).attr('id');
$(this).val(ui.item.id);
$('label[for=' + label + '] span').text(' (' + ui.item.value + ')');
return false;
}
}
);
});
}(jQuery));

0 comments on commit d0452c5

Please sign in to comment.