views:

65

answers:

4

My friend and I have a site (www.rosasecta.com). It uses a lot of Ajax, but it's all by hand, and it's really ugly and hard to dig through. We want to switch to a JS library, but JQuery, Prototype, and Dojo are to large. We just want a small, compact library that can do AJAX cleanly and some basic DOM selecters. Can anybody recommend one?

Thanks in advance.

+5  A: 

jQuery isn't large at all, and you can use Google's hosted version meaning many of your users won't even have to download it upon visiting your page.

You requested:

  1. Lightweight
  2. AJAX Capabilities
  3. DOM Selectors

You've practically got jQuery already.

Jonathan Sampson
There's a downside to the hosted version: when SO switched to it, a few users (just 1 or 2 out of 1000s) complained on meta because their corporate firewalls blocked it for some reason.
Joel Coehoorn
True. But that number is sufficiently low :)
Jonathan Sampson
+3  A: 

jQuery minified at aro 56K is less than the size of a typical JPG file. It will do everything you need and a whooooooole lot more

Scott Evernden
+5  A: 

The selector portion of jQuery, dojo (and some of the other frameworks) is actually available as a separate library, the Sizzle Selector library:

http://sizzlejs.com/

Sizzle purports to be only 4kb minified and gzipped according to their site.

However, with ajax too, I think a customized jquery with only the smallest bits may be the best "complete package". Some of the other libraries like dojo have methods of building them with exactly the features you want, too.

The default jquery minified+gzipped is only 19kb. I think a core build can be done down to only 12kb.

Crast
A: 

What about MooTools? It won't provide everything jQuery will, but if it will do what you need, it's very small.

brknindex