Video: Which version of jQuery to use

Ok, so we're going to use jQuery. Which version? There are two major versions of jQuery as of the time I'm recording this video. They are actually branches. They're two different lines of development. There's the 1.x branch and the 2.x branch. So which one are you going to use? First of all, you may already have a version of jQuery installed in the project you're working on. If you want to know of course you can look through the files of your project and see if you have a jQuery.JS or jQuery.min.JS included somewhere in your project. Another way you can look is to load your project in the browser and see if the dollar sign or jQuery object is defined.

Take the next step in your web design career with jQuery, which amplifies JavaScript's power and puts a library of prebuilt functions and a diverse selection of plugins at web designers' fingertips. This course explains what jQuery is, how to install it, and use it to script more interesting, interactive websites. Author Joe Chellman will show you how to use jQuery to add web form usability, audio and video, animation, and other features like slideshow galleries to your existing HTML and CSS-based webpages.

Which version of jQuery to use

Ok, so we're going to use jQuery. Which version?There are two major versions of jQuery as of the time I'm recording this video.They are actually branches.They're two different lines of development.There's the 1.x branch and the 2.x branch. So which one are you going to use?First of all, you may already have a versionof jQuery installed in the project you're working on.If you want to know of course you can look through thefiles of your project and see if you have a jQuery.JS orjQuery.min.JS included somewhere in your project.Another way you can look is to load your project in thebrowser and see if the dollar sign or jQuery object is defined.

This is what that looks like.So I'm here on jQuery.com, and I'm just going to load up my developer tools.Use Cmd+I here in in Chrome.If I just type dollar sign and something isdefined here and it appears to be a function.Now, this isn't very helpful. So, what I'm going to do islook for jQuery as well and that is defined.If jQuery was not available, this would tell me that there is an error.So, that's where you can see in your browserby loading your project if jQuery is actually defined.If it is, you've got it, go for it, use it.If you do not have jQuery already, you stillneed to make the decision of what version to use.

So, if you need to support Internet Explorer Sixthrough Eight, you're going to need to use 1.x, period.jQuery 2 does notsupport those versions anymore.If you're building a web app or a browser plugin, somethingthat's relatively self-contained, the jQuery folks recommend that you use 2.x.That's one of the use cases that it's built for, especially withits ability to grab little pieces and not necessarily use the entire library.In general I think its still a good idea to use 1.x.There are still more then enough users of those older versions ofinternet explorer to make it worth your while to keep using 1.x.

It's still fully supported by the jQuery developers and so you might as well useit, unless you know for sure thatyou don't care about supporting those older versions.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Already a member ?

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships.
Learn more

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.