Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Adding a user interface with jQuery UI

From: jQuery UI Widgets

Video: Adding a user interface with jQuery UI

If you're working on a website, you may have something very simple like this, to Gets many interactivity and animation all for Just as jQuery is a library of JavaScript functions, jQuery UI We just saw So, in this case, we can make things look selectable.

Adding a user interface with jQuery UI

If you're working on a website, you may have something very simple like this, to which you might want to add some interactivity, kind of spruce it up a little bit. One way you can do that, could result in turning this, into this. Gets many interactivity and animation all for free from the same relatively simple markup. And the way we're doing this is with jQuery UI. Just as jQuery is a library of JavaScript functions, jQuery UI is a library of jQuery and JavaScript functions, and some CSS.

Let's take a look at a few demos to see some of the things that jQuery can do. We just saw the accordion, which is these collapsible panels of Content. As you can see there are lots of different options available. I think one of the first things people think about when they think of jQuery is things like this. User interface widgets, and there's a bunch of them. Progress bars, sliders, tooltips, a bunch of stuff. So this is not a user interface widget as such, but it is a collection of JavaScript functions that make it easier to do certain things in a user interface that you're crafting.

So, in this case, we can make things look selectable. You can make items resizeable, sortable, and more. JQuery also includes a set of extended effects. One of the big ones that is not included in jQuery core, is animating the color of something. There are other utilities as well. JQuery is a massive library. So let's see how to install it. Just go to Download. And when you hit this page, you get a Download Builder, which lets you choose which components of jQuery UI that you want to download.

As you can see there is a lot of them. So what I usually do is toggle them All Off, and then add in the ones that I need for the particular project that I'm working on. So we're going to install just the ones that we need for this course. And you can skip all the core stuff because they'll be chosen automatically depending on which other pieces you want. So I'm going to choose the Accordion, The Date Picker, and then here under Interactions, I'm going to go for Sortable. And then finally, we're going to grab all the Effects. In addition, when we're looking at this example or where we start with plain looking HTML and then turn it into something like this, this is because there is a theme included.

Now you don't have to download a theme, you could make your own. What jQuery UI does behind the scenes, if I inspect this. Is it adds a bunch of classes, adds a bunch of JavaScript that we can use to hook into those classes to make things work the way they do here. So you could go entirely without a theme if you want to design your own, or you can use their custom theme builder. In this case, I am going to download a theme, and I'm using the Cupertino theme. So if we download that, and here it is. This is the custom version that I've just picked out. So if I unzip this, and take a look inside, I can see that I have CSS files, the development bundle, which is a whole bunch of stuff, that you, perhaps, don't need in production, and then the JavaScript files.

This includes a copy of jQuery, the non-minimized version, as well as a non-minimized version of the jQuery UI custom build and a minimized version. So the minimized version is probably the one you'll be calling most often. But, to use this stuff, drag it in here, and I'll usually rename this to just jQuery.ui, something like that. Now open up my install file. So, there's a few things that we need to include. First of all, we need to include the style sheet, using jQuery.ui in the same folder, and then let's grab the names of these. So Cupertino is the name of my theme.

So I'm going to copy the name of the file and its full path. So it's in css cupertino. So now we have the CSS loaded, and we'll also need to include the script files. These need to go after jQuery, because of course, we need jQuery loaded first. And then the rest of it will go here, jquery.ui/js. And then we'll just grab this one. We already have jquery loaded, so we don't need that. Just like this. Save this and go back to my install page, reload, and wallah, nothing happens.

We'll be looking at how to actually start using jQuery UI in upcoming movies. But now you know what jQuery UI is and how to install a custom build. I'll mention one more thing. You'll see at the bottom of every page on the jQuery UI website similar CDN installation methods, just like you'd see for jQuery itself. These will work fine, but they will include the entire library. So this can be pretty inefficient if you're not planning to use all of jQuery UI. They also point you only to the smoothness theme, although all the themes are available over their CDN.

So, that's a look at what jQuery UI is, and how to install your own custom build.

Show transcript

This video is part of

Image for jQuery UI Widgets
jQuery UI Widgets

10 video lessons · 4146 viewers

Joe Chellman
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

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.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed jQuery UI Widgets.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

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

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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:

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:

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

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.