开发者

Good Reusable, centralized AJAX component based on jQuery

开发者 https://www.devze.com 2023-01-16 18:58 出处:网络
I ofetn find myself writing the same code in开发者_Python百科 jquery for ajax stuff. Still i can\'t find a good

I ofetn find myself writing the same code in开发者_Python百科 jquery for ajax stuff. Still i can't find a good Reusable, centralized AJAX component based on jQuery...

Note: One similar question i had asked before Reusable jquery ajax requests but it had some issues.


I'd say the reason you can't find one is because that's what $.ajax() is at its heart.

Sounds like your best bet would be to use modular coding techniques to make simple functions as wrappers for things you find yourself duplicating, then include them in a common js file.

If you just want something that feels jQueryish to use, you could make it as a plugin: http://docs.jquery.com/Plugins/Authoring

0

精彩评论

暂无评论...
验证码 换一张
取 消