精简版的jQu​​ery的AJAX / JSON的功能精简版、功能、jQu、ery

2023-09-10 19:13:02 作者:喜你成疾,药石无医

我喜欢的jQuery AJAX / JSON的功能,但该库是非常大的黑莓手机开发。有没有人拉出或开发一个独立的AJAX / JSON库类似于jQuery的?我知道的jQuery移动版即将到来,但是这看起来是更直指图形用户界面的iPhone。我也试过XUI,但在IE7中运行时已经越来越JavaScript错误。

I like AJAX/JSON features of jQuery but the library is very big for blackberry phone development. Has anyone pulled out or developed a stand alone AJAX/JSON library similar to jQuery's? I know that a mobile version of jQuery is coming, but this looks like it is more directed at GUI for iPhone. I also tried XUI, but have been getting JavaScript errors when running in IE7.

推荐答案

这需要一点技巧来完成。正如lonesomeday已经提到的,是一种方法。另一种方式是写一小块code,它使用所有你的jQuery如所需要的功能一个虚拟函数与Ajax调用和JSON等。

This is slightly tricky to accomplish. As lonesomeday has mentioned, that is one way. The other way is to write a small piece of code which uses all the functions you need from jQuery e.g. a dummy function with ajax calls and json etc.

然后把一切都变成一个单一的JS文件,并通过谷歌的关闭编译,提供先进的优化运行。

Then put everything into a single JS file and run it through Google's Closure Compiler with Advanced Optimization.