Drupal 7 set JavaScript / jQuery trigger on autocomplete field option

With this little snippet you can easily set a trigger on autocomplete field options (suggestions) click:

  1. $(document).on('click', 'div.reference-autocomplete', function(e) {
  2.   // Do what you need to do ;)
  3. });

It's not that easy because the selection click does not trigger any change event on the parent input.

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.

Weitere Informationen über Formatierungsoptionen