星期一, 8月 05, 2013

[jQuery] 搞懂 jquery plugin 與 jquery widget

對於jquery plugin與widget字義上有不清楚可以看一下stackoverflow解釋可以有助理解xd

jQuery plugins vs widgets

You can either write a jQuery plugin or a jQuery UI widget.
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 Widget vs Jquery Plugin, Differences, When to use which?

I've never heard of a jQuery widget. I imagine some people might use the term to describe a... widget... that has been made with jQuery. Certainly there are widgets in jQuery UI, for example. It's an odd question.
A widget is a widget (always includes a visual element, sometimes includes reusable functionality), and can be a subset of a plugin or a plugin in and of itself.
A plugin extends jQuery directly and may or may not have a visual component.

沒有留言:

張貼留言

留個話吧:)