Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Christoph Becker Newsgroups: comp.lang.javascript Subject: Re: jQuery and autosuggest and more Date: Tue, 18 Sep 2012 02:04:34 +0200 Organization: Aioe.org NNTP Server Lines: 28 Message-ID: References: <18804e03-6897-49e6-99df-c85e0f98c6e0@d6g2000yqd.googlegroups.com> <50577f19$0$65459$742ec2ed@news.sonic.net> <84367eb1-30c5-46fd-88f3-97c875e2dfa4@n9g2000yqn.googlegroups.com> <5057a649$0$65474$742ec2ed@news.sonic.net> <4dee4ade-2487-4e0e-8349-6d9a772572ea@j10g2000yqj.googlegroups.com> NNTP-Posting-Host: 30V9ILqO69vBIoafjf5ZFg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.javascript:15943 justaguy wrote: > What am I missing here? Many thanks. You probably want: $( "#tags" ).autocomplete({ select: function(event, ui) { console.log(ui.item); } }); And IMHO that's the /most/ basic problem with jQuery and similar frameworks: they allow one to create amazing results by some trial and error without even grasping the basics, i.e. what are the semantics of the code. About a year ago I've written a simple form generator using jQuery -- without jQuery I couldn't have done it. But as I wasn't able to grasp the basics of ECMAScript back then, the code is totally crappy, and I vainly hope, that I'll never have to correct this... So, even if using jQuery and the loads of jQuery plugins is very tempting, you might reconsider this approach, and learn basic ECMAScript *first*. *Then* you might go on using whatever framework you prefer. -- Christoph M. Becker