lightweight alternative to jquery-ui autocomplete plugin? [closed]
Asked Answered
M

5

16

does anyone know of a lightweight alternative to the jquery-ui autocomplete plugin?

I'm not using any other jquery-ui components in the project (base lib is jquery 1.5.2). So dont feel I can justify adding 20k (minified) just for simple autocomplete on a single search field.

possible options so far are:

https://github.com/agarzola/jQueryAutocompletePlugin

http://code.google.com/p/jquery-autocomplete/

I dont want to roll my own plugin for such standard functionality .. surely there has to be a great solution out there already?

Monadnock answered 3/6, 2011 at 17:49 Comment(6)
That 20k custom build shrinks to 7k when gzipped. Does your server support that? Is your jQuery coming from your server or a CDN? If its from your server, you could even combine the jQuery and jQueryUI into one file and serve it gzipped (one less HTTP connection).Pronuba
I am of course using gzip and combining files to reduce http requests. But even so, there is still load extra code in that build that I dont need. Of course this in itself is not a significant additional overhead, but it all adds up.Monadnock
I'm seeking an alternative just because of this 20kb extra baggage.Mechanistic
testing github.com/laktek/jQuery-Smart-Auto-Complete atm..Monadnock
What about using google's CDN? There's a good chance users will already have the file cached on their system: developers.google.com/speed/libraries/devguide#jquery-uiGranese
If someone is interested, autocomplete source is here code.google.com/p/jquery-ui/source/browse/trunk/ui/… and of course is incomplete, since it needs more global stuff to be declared. I picked the full code from code.jquery.com/ui/1.9.2/jquery-ui.js and removed everything I did not need. The only thing you might test is this piece: pastie.org/5591507Pender
O
6

Sorry but I believe that your research of alternatives will not pay off.

For the other alternatives that you suggested the minified weight is 14.52 kb (agarzola) and 10KB (jquery-autocomplete), so 20KB from the most tested and complete solution doesn't seems like too much to me.

I think you should pay more attention to other important aspects of each plugin instead of the size when the difference is so tiny. Even more in the case of autocomplete functionality, which will consume bandwidth on each automatic search, so I guess I would not use autocomplete if my first concern were the bandwidth.

Opinicus answered 27/9, 2011 at 23:20 Comment(0)
B
0

yeah, Jquery UI is quiet chunky and is only worth using if you are going to use a bunch of plugins (draggable, resizable, etc. )

I've used : http://codeassembly.com/Unobtrusive-jQuery-autocomplete-plugin-with-json-key-value-support/ for my simple projects couple of times and I reckon its amazing.

you can also check this tutorial out http://return-true.com/2009/08/how-to-jquery-autocomplete/ but I think the first option is sufficient

Bratcher answered 17/7, 2011 at 16:7 Comment(0)
H
0

http://docs.jquery.com/Plugins/autocomplete#Example ;)

Heterotrophic answered 1/8, 2011 at 13:7 Comment(1)
This has been deprecated now. #6795267Statued
A
0

I've had reasonable luck with 'UFD' ( http://code.google.com/p/ufd/ ), the Unobtrusive Fast-filter Dropdown. It's not perfect, but it might meet your needs.

Awildaawkward answered 27/9, 2011 at 22:46 Comment(0)
L
0

Have you tried Ninja UI?

Lunde answered 20/1, 2012 at 0:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.