The final version of jQuery UI 1.8 just got released a few days ago. I will go through all new features and also show you some examples with the new widgets.
Along with the hundreds of bug fixes and improvements, 5 new plugins and 1 new effect found the way into the bundle.
What’s New in jQuery UI 1.8?
The jQuery UI team worked hard to make the framework even lighter, more modular and flexible. If you are a developer, it’s now even easier for you to build your own widgets or extend the pre-built ones.
Also don’t forget about the ThemeRoller Firefox Developer Bookmarklet. This brings the ThemeRoller into any page on the web! To install it, simply drag the link into your Firefox toolbar. (or just click it right now to give it a try!).
The Position Utility
With this, you can position any element relative to any other, or even relative to the parent window or your mouse. Like in the “Write Less. Do More”-fashion, you just have to select the element you want and configuring which part of it should be positioned relative to which part of another element. That’s all!
Take a look at the official documentation here.
You can also take a look at the two provided demos which are included.
Position Utility – Demo 1:
You can use the form controls to configure the positioning or you can drag the positioned elements to modify the offsets.
Just drag around the orange parent element to see the collision detection in action!
Position Utility – Demo 2:
This is a prototype of the photo-viewer using the Position Utility to place the images at the center, left and right of your parent and cycle them.
To cycle them, just click the “Previous” and “Next” links at the top or on the images on the left or right. Also take a look how the images are repositioned after you re-size the window.
The Button Widget
With the button widget you can create a fully theme-able button from any imaginable element you want to use as a native button.
Use them right now in your dialog boxes or forms.
Take a look at the official documentation here.
They have also provided 6 different demonstrations there. Two of them I will show you now:
Button Widget – Demo 1:
Button Widget – Demo 2:
On this Demonstration you will see a (not functional) media player toolbar, filled with all types of buttons you can create with the new widget. Buttons with icons, checkbox-type buttons (“Shuffle”) and three radio-type buttons (“No Repeat”, “Once” and “All”).
Don’t forget to take a look at the source code. The setup/code is really very easy.
The Autocomplete Widget
This is maybe the most requested feature, which made it into the latest release of jQuery UI – The Autocomplete. Now you are able to make any text input field pop up a menu to help the user in completing their search or entry, provide suggestions or show all allowed values.
You are able to provide static data using the source option, or provide a callback function as the data source which can get the data from a server via Ajax.
Also there are a lot of demonstrations on the official documentation page. You can take a look at it here: Official Autocomplete Documentation. I will again present you two of them:
Autocomplete – Demo 1:
Autocomplete – Demo 2:
In this demonstration, the data source is a remote JSONP. In this case: geonames.org webservice. While you will end up with only the city name itself in the input box, more info is displayed in the suggestions box to help you find the correct entry.
This data is also available in callbacks, as you will get it illustrated in the results area below the text input field.
Take A Look At The Complete Changelog
Click the link above to take a look at the full list of changes between jQuery UI 1.7.2 and jQuery UI 1.8.
Downloading jQuery UI 1.8
Of course, you have a few options again to get the latest build of jQuery UI.
The Complete Package:
The Full Development Bundle:
Of course you can also get the full jQuery UI 1.8 Development Bundle, which also contains all components and the base theme. This package is optimized for development of jQuery UI itself or the redistribution of your own builds – not for the “Getting Started Guide”.
The Full Theme Pack:
With the jQuery UI 1.8 Themes Pack you will get all of the 21 Themes of the ThemeRoller Gallery. You can just take one and use it, or take one as a starting point and tweak it to your wishes. For example you can use it along this bookmarklet.
If you know exactly what you want, you can go to the jQuery UI 1.8 Download Builder to customize your build and download it as a custom zip file. Of course it still takes care of plugin dependencies, so you don’t have to worry about that!
Other Download Sources:
Now jQuery UI 1.8 is also hosted on Google’s AJAX Libraries API page. As Usual you can directly use them in your script sources so you disburden your server.
- Minimized version: http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js
- Full Version with comments: http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.js
- Always the latest 1.x build: http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js
Of course you can still go to GitHub to get the latest version there too.
Last Words And Links
If you are ready for jQuery UI 1.8, make sure to use it along the latest jQuery build (1.4+) so you get the full performance and compatibility.
The Core of jQuery UI is now 71% smaller. They have achieved this optimization by pulling the already modular but bundled components mouse and widget.
The new mouse plugin file makes the average jQuery UI 14% smaller. This plugin is not new, but now it is moved to its own file, where before it was in the core.
Most interesting links:
- jQuery UI Developer Forum
- Full Changelog
- jQuery UI Bug-Tracker
- jQuery UI Design & Planning Wiki
- ThemeRoller Bookmarklet
- Support Center
What can we expect from jQuery UI 1.9? I’m already very excited – Discuss in the comments and have fun trying out all new features and lets fill the web with some nice jQuery User Interfaces!
Happy developing! 🙂