jQuery插件与小部件 [英] jQuery plugins vs widgets

查看:118
本文介绍了jQuery插件与小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个月前,我开始使用jQuery插件进行一些实验。我在Interenet上找到了一些教程,我开始把东西放在一起。

几天前我需要建立自己的插件并回到我原来的项目中。为了在互联网上找到更多信息,我碰到了这些叫做小部件的新事物。

Few months ago I started some experiments with jQuery plugin. I found some tutorials on the Interenet and I started to put something together.
A couple of days ago I had the need to build my own "plugin" and got back to my old project. Trying to find some more informations on the internet, I bumped in these new "things" called widgets.

根据我的理解,我应该忘记插件并开始开发小部件。
插件是旧概念还是仍然有效?
如果你需要一个带界面的自定义jquery控件,最好的方法是什么?

For what I understand I should forget about plugins and start developing widgets. Are the plugins an old concept or are still valid? What is the best approach if you need a custom jquery control with interface?

我正在广泛使用jQuery UI。

I am using extensively jQuery UI.

推荐答案

您可以编写 jQuery插件 jQuery UI小部件

取决于你想做什么。这些都不是过时的。如果你编写一个小部件,它将依赖于jQuery UI(当然还有jQuery),如果你编写一个插件,它将只依赖于jQuery。真的,这取决于你想要达到的目标。

Depends on what you want to do. Neither of these is outdated. If you write a widget, it will depend on jQuery UI (and jQuery of course), if you write a plugin, it will only depend on jQuery. Really, it depends on what you want to achieve.

这篇关于jQuery插件与小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆