Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between a jQuery plugin and a jQuery widget? [closed]

Can someone concisely explain the differences between jQuery plugins and jQuery UI widgets? What are the conceptual differences? Why would I choose one over the other and what pros and cons are there for each. What are the differences in the intention and concept for each?

I've written both, but I'm not clear on the nitty gritty differentiations. I want to make sure I'm choosing appropriately in each case.

Thanks!

like image 739
unklegwar Avatar asked Jan 22 '10 15:01

unklegwar


People also ask

What are jQuery plugins?

A jQuery plugin is a method that we use to extend jQuery's prototype object. It is a piece of code written in a JavaScript file, which enables all jQuery objects to inherit any methods that you add.

What is difference between jQuery and jQuery UI?

jQuery is the core library. jQueryUI is built on top of it. If you use jQueryUI, you must also include jQuery. jQuery Tabs preceded jQueryUI library.

Is jQuery UI include in jQuery?

If you want to use jQuery. UI you have to include jQuery.

What is a factory widget?

The widget factory defines how to create and destroy widgets, get and set options, invoke methods, and listen to events triggered by the widget. By using the widget factory to build your stateful plugins, you are automatically conforming to a defined standard, making it easier for new users to start using your plugins.


1 Answers

Widgets are part of the jQuery UI library, where plugins aren't. Also, the Widgets have a visual component for the GUI, whereas plug-ins don't necessarily (although some do).

like image 197
GSto Avatar answered Oct 18 '22 14:10

GSto