RSSAmplifier

Blog

You Don't Need jQuery!

Free yourself from the chains of jQuery by embracing and understanding the modern Web API and discovering various directed libraries to help you fill in the gaps.

blog.garstasio.comRSS feed ↗7 posts

Latest posts

Beyond jQuery

You asked for more, and I was happy to oblige, because this blog only scratches the surface. On Twitter , and in the discussion sections here, I mentioned that a longer-form version of my YDNjQ series was in progress. Back in early 2015, I began writing a new book titled “Beyond jQuery” . My goal was to greatly expand on the topics I wrote about in this blog. Well, it is finally finished, and it…

Utilities

In the sixth and final post of this series, I’m going to cover some of the utility methods that jQuery core provides, and show how you can acheive the same results with vanilla JavaScript. Focus will be on modern browsers, but I’ll also go over achieving the same ends in ancient browsers as well. Modern browsers are considered to be anything newer than and including Internet Explorer 9. Anything…

Events

In this fifth installment of “You Don’t Need jQuery (anymore)”, I’m going to talk about dealing with events in the browser without jQuery. As always, each section will cover the jQuery approach, followed by a solution using the native Web API instead. After reading this post on events, you should be confident enough to deal with events in your own project without using jQuery. As I’ve mentioned…

Ajax Requests

Many developers who learned web development through a jQuery lens probably think that jQuery is doing something magical when you invoke the $.ajax method. That couldn’t be further from the truth. All of the heavy lifting is done by the browser via the XMLHttpRequest object. jQuery’s ajax is just a wrapper around XMLHttpRequest . Using the browser’s built-in support for ajax requests isn’t very…

DOM Manipulation

We previously learned how to easily select elements without relying on jQuery . but what about changing elements? What about creating new elements? How about relocating elements elsewhere on the page? You may be glad to know that all of this, and more, is also possible without pulling in jQuery. The Web API provides us with all of the tools we need, once again. You will see that some DOM…

Selecting Elements

How many times have you seen a web app or library that uses jQuery simply to perform trivial element selection? How many times have you written this: $(#myElement') ? Or this: $('.myElement') ? Psst… you don’t need jQuery to select elements! It’s pretty easy with the plain ‘ole DOM API. IDs CSS Classes Tag Names Attributes Pseudo-classes Children Descendants Exclusion Selectors Multiple Selectors…

You Don't Need jQuery (anymore)

A lot of web developers rely on jQuery. In many circles, jQuery and JavaScript are one in the same it seems. So, why shouldn’t you use it? Why should you stop using it? Don’t you just need it? jQuery makes everything easier. You can’t develop a solid web app without it. It’s far too difficult to ensure your app will work properly in all browsers without jQuery - the Web API implementation varies…