Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はjqueryオートコンプリートを使用しており、自動検索入力ボックスに検索アイコンを追加したいと考えており、検索を開始すると検索jpgを表示したいと考えています。誰でもこれについて提案を投げることができますか?
テキストボックスの keyup イベントを観察できます。これを試して:
$( "#tags" ).autocomplete({ source: availableTags }).keyup(function () { if (this.value !== '') { $(this).addClass('close'); } else { $(this).removeClass('close'); } });
デモ: http://jsfiddle.net/codef0rmer/5AASU/