Unlimited WordPress themes, plugins, graphics & courses! Unlimited asset downloads! From $16.50/m
by
FREELessons:13Length:53 minutes

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

2.1 Setting Up Your Files

In this lesson, Craig will show you how to prepare your files to make use of the Parsley JavaScript library. This will require both jQuery and the Parsley JavaScript file.

2.1 Setting Up Your Files

Hello, and welcome back. In this lesson, I wanna talk about everything that we need to include in our website in order to get Parsley working. Now Parsley does require jQuery, so you need to include jQuery in your website, as well as the Parsley JS library. So if you're going to download the files and put them on your own computer or upload them to your own web server, you can go to the parsleyjs.org website. Go to the Download link and there you will find some options for downloading the files. All you really need is this minified version parsley.min.js. If you wanna look at the full version, you can download parsley.js. It's a little bit bigger in size, but you can look through that code and kind of get familiar with it, but ultimately you'll probably wanna use this minified version over here on the right in production. Now for this course, we're gonna be doing all of our code on CodePen which you can find at codepen.io. But for any of the CodePens that we'll be using in this course, I will include links to those pens in the course notes for that specific video. So that way you can just open up those links, create your own copy of them and edit them however you want. And since we're doing this in the browser like this, we need to point to a CDN in order to use Parsley. And it's easy to find if we just do a search here for, let's do parsleyjs.cdn. CDN should be one of the first links you find. Here we go, cdnjs.com is what we're looking for. We can click on this link here, and you can find the links that you need there. And the second link is the minified version and that's the one I wanna use in our CodePen. So I'm gonna jump back over to CodePen and I'm gonna jump over to my Settings. And in our Settings we can set up any CSS or JavaScript files that we're gonna be using. So if I go over to the CSS tab here, you'll notice that I'm using Bootstrap and that's just so that we can very easily layout our forms without having to worry about doing all of the design ourselves. And then if we jump over to the JavaScript tab here, you'll notice that I've got jQuery included, and you can include jQuery very easily using this Quick add feature. You'll notice that jQuery is right there. And so I've included jQuery and I've also copied that CDN link for parsley.min.js and I've included it below that jQuery link. So if you're doing this on your own website and you're linking to these files make sure you link to jQuery first and then link to parsely.min.js. And so those are all the settings we're gonna be working with throughout the rest of this course. And then once you've got those files linked, you should be able to move right ahead and start validating your forms. And we'll get started talking about how do that in the next lesson. Thank you for watching.

Back to the top