Check out a free preview of the full Using JavaScript in Websites course
The "Third-Party Libraries" Lesson is part of the full, Using JavaScript in Websites course featured in this preview video. Here's what you'd learn in this lesson:
Brian explains how third-party libraries can be a useful tool for developers.
Transcript from the "Third-Party Libraries" Lesson
[00:00:03]
>> Brian Holt: We just built a rotating image gallery, so that's really cool. However as you might imagine, after browsing the Internet for a little bit, lots of people have already solved this problem. We haven't invented some wonderful new UI pattern here. So in light of that, there's lots of people that are actually really happy to share their code with you.
[00:00:26]
So that's what's really cool about the JavaScript community, and current programming community in general, is we like to share our code with each other. I'm gonna give you my code if I can use the code that you write as well. So we're gonna use one called Swiper. So let's actually just open Swiper's websites.
[00:00:44]
Swiper super swiper. So I have it up here.
>> Brian Holt: You can probably just Google for Swiper JS, and it's gonna be this top one right there.
>> Brian Holt: So Swiper, most modern mobile touch slider. That's a lot of words. But what's cool about is, I can actually click and drag this, and it just goes back, and forth just like this.
[00:01:15]
We get really cool image galleries like that.
>> Brian Holt: So as you can see, this is slightly more complicated than what we built. [LAUGH] But there's nothing to say that you couldn't build this, just you would need a little bit more time and a little bit no more know how with CSS animations.
[00:01:31]
Me too, right. Building these tilt animations is kind of a unfun exercise in my opinion. Still, depends on who you ask. So I want to show you how that you would go grab someone else's code off the Internet and integrate it into your own project, right. It feels a little bit like cheating, right.
[00:01:49]
Because I get all this really cool stuff happening, but I didn't have to write most of it. It's not cheating, this is actually what you're supposed to do.
>> Brian Holt: So I'm gonna go in and actually create another new directory here. Cuz I don't wanna overwrite this gallery one that I wrote, so I'm gonna create a new folder here.
[00:02:09]
And I'm gonna call it gallery two, or something like that.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops