i'm new to object oriented javascript. i want to be a javascript guru. so i leant oo-related concepts in javascript, such as scoping, scope chain, execute context, colsure, anonymous function... but when i try to practice my javascript knowledge to read jquery source code. i still can't understand a lot of it. anyone can give me some suggestions? great thanks!
jQuery source is minified, ie. it was minimized so as to make its size as small as possible. Try unminified version. Or better yet they have a Visual Studio Autocomplete Documentation, which basically gives you readability and a hell of a lot of comments.
Keep in mind that jQuery is a big library. Also the concepts you mentioned aren't OO related per se. In fact, most OO languages like C++, Java don't have most of those.
Also, JavaScript is a peculiar type of OO language (Prototype-based), so be wary.
Good luck.
If you want to learn how to read jQuery source code, why not learn from the creator? John Resig has made an Advanced Javascript Tutorial. Interactive and everything for maximized learning (:
Practice just using JQuery first in conjuction with your own JavaSctipt OO implementations. Trust what it does under the hood until you reach a sufficient guru level that you have a real need to start reading the source code.
I think the message is that if you are struggling to understand the JQuery source code so much that you have asked for help, then you have started reading it too early.
I agree its impossible to read. I just got my hands on a full documented version, here ya go buddy ..
Get the first one w/ (Visual Studio Autocomplete Documentation)