claro-8.x-1.x-dev/js/autocomplete.js
js/autocomplete.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * @preserve **/ ( function ($, Drupal) { Drupal.behaviors.claroAutoCompete = { attach: function attach(context) { $(context).find( 'input.form-autocomplete' ).once( 'claroAutoComplete' ).each( function (index, value) { var $input = $(value); var timeout = 400; var classRemoveTimeout = void 0; var classRemove = function classRemove($autoCompleteElem) { $autoCompleteElem.removeClass( 'is-autocompleting' ); }; $input.on( 'input autocompletesearch autocompleteresponses' , function (event) { if (event && event.type && event.type === 'autocompletesearch' ) { $(event.target).addClass( 'is-autocompleting' ); } clearTimeout(classRemoveTimeout); classRemoveTimeout = setTimeout(classRemove, timeout, $(event.target)); }); }); } }; })(jQuery, Drupal); |