Skip to content
0:00 / 0:00

#jquery#javascript#iife

10 Things I Learned from the jQuery Source

Paul Irish

11K subscribers • 5 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • Presented by Paul Irish
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

125K views16 years ago3 recommendations

Web developmentProgramming languagesJavaScriptVue, Svelte, Angular and others

Paul Irish walks through the jQuery source code to share ten useful JavaScript techniques and patterns.

paul irish walks through the jquery source. teaches stuff. s'awesome.

Why it's here

3 people recommend this

What people say. Highly recommended as a classic walkthrough for learning advanced JavaScript patterns from a production codebase.

Moments people linked to

niyazpkon Hacker News • Recommends

On “JQuery Deconstructed”

I found these videos by Paul Irish very interesting too: 10 Things I Learned from the jQuery Source : link to this video 11 more Things I Learned from the jQuery Source : link

jarek-foksaon Hacker News • Recommends

On “Code which every programmer must read before dying”

If you are fronted web developer then you should defenitely read jQuery sources. There is a lot of patterns that you could borrow and reuse in your own JS libraries. A good place to start is this interactive code viewer: link There is also a great presentation by Paul Irish ("10 Things I Learned from the jQuery Source"): link to this video

geuison Hacker News • Recommends

On “Tell HN: Will answer your javascript questions for the next few hours”

Take a look at this. link to this video This is Paul Irish giving a breakdown of interesting bits about jQuery. He talks about this technique roughly 50 minutes in.

Adri w Ukraineon Stack Overflow • Mentions

On “What is the purpose of wrapping whole Javascript files in anonymous functions like “(function(){ … })()”?”

In short Summary In its simplest form, this technique aims to wrap code inside a function scope . It helps decreases chances of: clashing with other applications/libraries polluting superior (global most likely) scope It does not detect when the document is ready - it is not some kind of document.onload nor window.onload It is commonly known as an Immediately Invoked Function Expression (IIFE) or Self Executing Anonymous Function . Code Explained var someFunction = function(){ console.log('wagwan!'); }; (function() { /* function scope starts here */ console.log('start of IIFE'); var myNumber = 4; /* number variable declaration */ var myFunction = function(){ /* func…
82View the answer

tangueon Hacker News • Mentions

On “Wonderful Javascript Talks?”

Classics John Resig : The Dom is a mess link Javascript, The Good Parts link Speed up your Javascript link Brendan Eich : Fluent 2013: Brendan Eich, "JavaScript at 18: Legal to Gamble" link Paul Irish : 10 things I learned from the Jquery source link to this video Less known but very interesting Building High-Performing JavaScript for Modern Engines link