We don’t allow questions seeking recommendations fo开发者_StackOverflowr books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this questionMy 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.
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.
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:
- Lightweight
- AJAX Capabilities
- DOM Selectors
You've practically got jQuery already.
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
Zepto.js: http://zeptojs.com/#download (8kb gzipped)
What about MooTools? It won't provide everything jQuery will, but if it will do what you need, it's very small.
Atomic.js , Size is less than 1kb and angular style , simple js library https://github.com/cferdinandi/atomic
Read more
https://ultimatecourses.com/blog/writing-a-standalone-ajax-xhr-javascript-micro-library
精彩评论