Comment

Comment by jakejake

I personally find it odd to create every component as a jquery plugin. To me, it makes more sense to write a plugin only when you're extending jquery core functionality itself in some way.

As far as "extending" goes though, it's not always clear. Is a date picker extending jquery's core? I personally think not, but there has evolved an expectation that every web component must be initialized like so:

$('#container').doSomething();

So I suppose a lot of people do it that way just to have a familiar look to their API, or even just to show up in listing as a jquery plugin.

parent jakejake 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton