So by now or if you haven't, please watch the video of John Resig.
I give you these interviews because
I want you to understand the mentality of what produced these, right?
jQuery is a piece a code, yes.
But as also an expression of a personality in John Resig
is a person that created this, and so it's an expression of who he is.
So John Resig is a really smart computer scientist.
In 2005, he was just tired of building interactive web applications that use
JavaScript and he was tired of doing non-portable stuff, and
he also saw the elegance of JavaScript itself.
How JavaScript's object pattern worked.
Stuff I just talked about in the last lectures.
He's like JavaScript is not a crappy language,
it's actually an impressive language.
And so as a computer scientist, as a young, undergrad computer
scientist at RPI, I think Rensselaer Polytechnic in upstate New York.
He's like,
this is kind of a neat computer science place to do kind of respectable work.
This is something that's not just crap work.
And if you go and listen to Brendan Eich talking about JavaScript,
he'll say, JavaScript was originally thought of as the crappy language.
And it sort of does silly things, and puts up pop ups, and annoys you and
has scrolling and whatever, but in this 2005, 2006, 2007 timeframe,
JavaScript was sort of coming, and the browser, was coming into its own as
a respectable place that talented computer scientists would want to work.
And certainly, sitting here, ten years after that, we see things like Angular,
and React, and all these things where JavaScript is really the focus.
And then, JavaScript is taking over the server as well with things like Node.js.
So, John Resig was like what are the kind of things we have to do
in the browser all the time.
Well, one is you gotta go find stuff in the DOM and do stuff to that,
like change its color or hide it or show it or whatever.
And the other thing is that there's events and that's the events that we've looked at
so far like unclick equals or unchange equals, those kind of events.
And jacking into those events was simple things like clicking,
that worked pretty well.
But things like knowing when the document fully loaded and all the images were done,
that turned out to be very different in every browser.
And so jQuery standardized that as well about knowing when the document [COUGH]
is loaded enough so that you can run JavaScript to start playing with the DOM.
You want the DOM to be complete.
You don't want JavaScript to be looking for things that aren't quite there yet.
So it came on in 2006 which is about ten years after JavaScript was created.
John, as of this moment, works at Khan Academy and
some of you who have high school students may have taken some
of the John Resig inspired computer science classes on Khan Academy.
And he is like me, a big fan of everybody learning to code.
And he, like me, is also a big fan of moving coding down into high school,
eighth, ninth, tenth grades in high school.
And so he's a great guy and it's a fun interview.
So I encourage you to take a look at John Resig.
So this lecture is not going to sort of give you speeds and feeds for jQuery.
One of the things that John talks about is there were other competitors to
jQuery in 2005, 2006, like Prototype and NewTools.
And they were like religions and jQuery was just one of the religions.
But jQuery in a very short period of time won.
And John credits, and I think I agree with him, that he
credits the reason that jQuery won in '05, '06, was that it had better documentation.
And he put a lot of time into documenting what he did, not just writing great code
and making it so he could use it, but making it so others could use it.
So literally, you'll say things like,
how do I animate an image to appear and slide in from left to right with jQuery?
You type that in and then bang, you're on stack overflow or you're on a jQuery page.
The jQuery documentation is superb.
It's both thorough but it also gives you these little tiny snippets
of like five lines that do pretty much what you want to do.
So you just ask the question into your search engine.
You either go to stack overflow or jQuery.
You copy and past five lines.
You stick in your thing.
It starts working and then you changed two of them to do exactly.
So, I'm really going to just spend this lecture talking about the real
basic things that jQuery does, knowing that you can figure this out on your own.