5

I was searching a lightweight and crossbrowser compatible solution for my web site. Here is the solution i have successfully implemented:

Codes: http://www.jamipietila.fi/codeigniter-and-autocomplete-with-jquery/ Working Example: http://demosivut.net/demo/ci_jquery_autocomplete/index.php/autocomplete

But using jquery.ui costs 200 kb for js file and another 33 kb for css file.

I am planning to implement that autocomplete box into every pages and it seems that costs a lot for just a autocomplete box.

Is there a smaller solution for this ?

mirza
  • 5,685
  • 10
  • 43
  • 73

2 Answers2

7

This is the autocomplete script I use: http://www.devbridge.com/projects/autocomplete/jquery/

It weighs in at 7kb when minified, however it obviously relies on jQuery too which adds to the footprint.

It's worth noting though that if you are using jQuery UI from a CDN, the chances are it's already cached in a visitors browser, therefore the successive load times will be vastly reduced.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • any idea about how to change data transfer method from get to post ? because it uses "?query=example" and i want to change it like "/example" ? – mirza Feb 07 '12 at 11:45
  • I think this plugin is get only. It may be worth emailing the developer to see if he can add it as an option. – Rory McCrossan Feb 07 '12 at 11:52
  • I followed your advice and sent an e-mail to Tomas (developer of that plug-in) his advice was changing "$.get" to "$.post" did the job. – mirza Feb 07 '12 at 19:53
2

You can customize your jquery ui libary on the jquery ui homepage. So you could deselect every component you don't need. http://jqueryui.com/download
Otherwise you could try to search for jQuery autocomplete plugins, maybe those are smaller in their sizes.

mas-designs
  • 7,498
  • 1
  • 31
  • 56