4 ms·
http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/
by gberger 11y ago
http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/
- plugnburn 11y agoI second this. JQuery must die.
- have_faith 11y agoWhat do you consider a reasonable reason to build something as a jQuery plugin as opposed to pure-js? or do you believe jQuery plugins are redundant by default? Just interested.
- jakejake 11y agoI 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.
- bobm_kite9 11y agoBasically, this function is just an onMouseOver event, which then inspects the element and displays text from the "desc" tab in the right place. I've been thinking for a while that it would be nice if we could add events to the CSS syntax, something like: a[desc] { onMouseOver: asideFunction(); } I _kind_ of worry that this is subverting the purpose of the css, but since it also handles hover and selected behaviour, it seems like the line isn't well-drawn anyway as to where styling ends and where behaviour begins. What do other people think?
- codingdave 11y agoI think that would be mixing presentation with functionality in a way that would become a maintenance nightmare.
- zelcon5 11y agoYes, this would have been awesome without the jQuery dependency. I don't think Javascript libraries should introduce ANY dependencies, because you are limiting the audience to codebases that already include said dependency. (No one will introduce a huge dependency like jQuery for just ONE library.)