Main content
Computer programming
Course: Computer programming > Unit 7
Lesson 2: DOM access with jQuery- Finding elements with jQuery
- Challenge: Unicorn-ify a page with jQuery
- Debugging webpages with the browser console
- Getting info on elements with jQuery
- Challenge: Famous discoveries
- Review: DOM access with jQuery
- Project: DOM detective
- History break: How did John build jQuery?
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
History break: How did John build jQuery?
Back in 2006, John Resig was a web developer working on his own projects. He was frustrated with how hard it was to write cross-browser JavaScript, and decided to write his own JS library to fix the problem for him: jQuery.
On January 16th, 2006, John Resig gave a talk about his new library at a local BarCamp, to a small crowd of local web developers, and blogged about it after:
This is what the jQuery webpage looked like back then:
Many web developers loved the simplicity and power of jQuery, and John's library soon grew in popularity.
Today, it's the most popular JS library on the web, and is maintained by the jQuery Foundation, a large team of volunteers.
Want to learn more about why John invented jQuery and how he turned it into a successful library with hundreds of contributors and thousands of developers? Watch this video where UMich School of Information professor Charles Severance interviews John Resig in the Khan Academy office:
Want to join the conversation?
- How long did you (John Resig) work on jQuery before you released it?(34 votes)
- It took about 3-4 months of part-time work to arrive at what you see above. The original version of jQuery was much much smaller than what's there now (and the browser support wasn't nearly as good). It took another 8 months of work to arrive at a 1.0 release, along with contributions from many other contributors.(131 votes)
- Is it really hard to create your own programming language?(11 votes)
- No, but it may be hard to create a useful one.(29 votes)
- How much knowledge of JavaScript or other programming languages did you have when you stared building jQuery?(23 votes)
- Where can I download a good version of javascript for personal use in development? Thanks, James S.(3 votes)
- Compilers don't process JavaScript, as it is not a compiled language. It is mostly used by browsers. If you want to use it without a browser, look at node.js.(3 votes)
- How to make my own library?(3 votes)
- Libraries are simply collections of predefined objects. To build your own library is pretty simple but making it as powerful as a library like jQuery and processing.js is the real challenge. By the way, there are already millions of libraries at your disposal and you're free to design your own library if you feel that there is a function you need that just doesn't exist.(2 votes)
- How do get get to write a language?(2 votes)
- I wrote an assembly-like language here: https://www.khanacademy.org/computer-programming/assembler-instruction-demo/6488338376163328
I didn't have to ask permission or anything. I do not expect the user base to exceed one.
My brother wrote a far more popular language: https://en.wikipedia.org/wiki/INTERCAL Again, no permission was necessary.(4 votes)
- what are the things required to make your own programming language?(3 votes)
- how DO YOU make something like jQuery like with all the code and stuff and the language? its so weird but cool! how do they do it?(2 votes)
- Umm, it's a big code, but it's not very complex. You can write the same things as in jQuery but without jQuery. For example, getting an element from a page:
$("a.myClass")
can be written even in old Javascript code like this:var aTags = document.getElementsByClassName("myClass");
var result = [];
for(var i=0;i<aTags.length;i++) {
if(aTags[i].tagName=="A") result.push(aTags[i]);
}
//result is now the list of "a.myClass" elements
newer standards replicate jQuery search, and works like this:document.querySelectorAll("a.myClass");
The rest of DOM Manipulation is mostly a reflection of pure Javascript DOM manipulation methods.
What I find most useful in jQuery are events and $.extend(). Events because it's already made and I don't have to write a multiple event handlers per event situation. And extend() comes in handy quite often, but it's fairly easy to write by yourself. jQuery animations might also be handy, but CSS transitions are better suited, faster, and work everywhere now.(2 votes)
- What references or books you've used at that time to start jQuery project?(2 votes)
- Where is the link to the interview?(1 vote)
- There's a temporary issue and the pictures and video aren't showing in this article.
Here's a link to the interview video on YouTube: https://www.youtube.com/watch?v=5SzUDgDvCzc(3 votes)