Posted about 3 years ago

You don't have to use jQuery for everything. Especially not for small stuff... Here's a list of pure js equivalents if you need them.

You might also like

A generic jQuery message panel « Are we there yet?
50 jQuery Function Demos for Aspiring Web Developers
Essential jQuery Plugin Patterns


Iļja Ketris

This is what we read:

Why have:

$.extend(true, {}, objA, objB);

When we can just have this:

var deepExtend = function(out) {
  out = out || {};

  for (var i = 1; i < arguments.length; i++) {
    var obj = arguments[i];

    if (!obj)

    for (var key in obj) {
      if (obj.hasOwnProperty(key)) {
        if (typeof obj[key] === 'object')
          deepExtend(out[key], obj[key]);
          out[key] = obj[key];

  return out;

deepExtend({}, objA, objB);

Why do we need jQuery? I would not stop here. Why do we need libraries at all? We can code everything ourselves, can't we? I had an impression that we need them exactly for that — to reduce lot of repetitive code into one line? I must have lived in darkness.

about 3 years ago   Like_icon 1 likes  
Abelardo Gonzalez

My impression was that, if you are loading jQuery only for


Then maybe you should use = 'none';


about 3 years ago   Like_icon 0 likes  
Abelardo Gonzalez

Some of the examples, I would ignore and use jQuery for anyway, like extend and deep extend. Or for Ajax. It doesn't hurt to know what the originals are anyway.

about 3 years ago   Like_icon 0 likes  
Melanie Archer

jQuery fan here. My fingers love typing .ajax() and .next() instead of the lengthier JS versions (though I guess CoffeeScript would be a good compromise). Nevertheless, I love the project's emphasis on provoking us to think, Really, does this application truly, really require jQuery?!.

about 3 years ago   Like_icon 2 likes  

Talentopoly Newsletter

A once-weekly round-up of the best programming and design posts.

Join 2050+ subscribers

We will never spam or share your email address. Easily unsubscribe

No one realizes how awesome this post is yet.