Class Animation- What’s new introduced by jQuery UI effects framework?
Unlike the standard jQuery that allows you to add, remove or toggle classes on specific elements; jQuery UI does a little more by allowing you to animate the transition between the former and latter states. jQuery UI does this by simply extracting the attribute values which can be easily animated via the starting and ending configurations, followed by invoking the standard animate call. The all-new animation can hence be triggered by specifying a duration while calling the functions viz: addClass, removeClass and/or toggleClass as shown in the below line of code:
In addition to above, jQuery UI also adds a new function called switchClass that’s used for removing a class and adding a new class with an optional transition between the two states. The line of code for this is as shown below:
$('#myDiv').switchClass('oldClass', 'newClass', 1000);
Color Animation- What to expect while working with jQuery UI Effects Framework?
The jQuery UI Effects Core module has added custom animation support for style attributes containing color values including:foreground and background colors, border and outline colors etc. With jQuery UI, you can easily animate the attributes that come with simple numeric values along with optional unit designators such as em, px, or %. Here, it is also interesting to note that color values are composed of three main components viz: red, green and blue. Each of these color components com with a color value existing between 0 and 255. Here’s how these color values can be specified in HTML and CSS:
- Decimal RGB percentages- rgb(87%, 100%, 91%)
- Minimal hexadecimal digits- #CFC
- Decimal RGB and transparency values- rgba(221, 255, 232, 127)
- Hexadecimal digits- #DDFFE8
- Decimal RGB values- rgb(221, 225, 232)
- A named color- lime
jQuery UI accompanies a pleasing documentation
A majority of web programming experts who have used jQuery UI effects framework are well familiar with the detailed documentation available with the software. The eye-catchy presentation of jQuery UI documentation is a great delight for novice developers who’ve just started off with development of web applications using jQuery UI effects framework. Starting with a good overview of each of the jQuery elements under specific category such as widgets etc; jQuery UI documentation never disappoints you when it comes to boosting the performance of apps using additional functionalities.
jQuery UI comes with functions that support the existing effects
As an attempt to improve the already existing effects of jQuery UI, the Effects Core module has come up with numerous functions that can be used for boosting the performance of these effects by a great level.
jQuery UI comes with effects determining the appearance and disappearance of existing elements
Here’s a look at some of the finest jQuery UI elements that have played a pivotal role in deciding the appearance and/or disappearance of different elements:
- explode– with this, the element breaks up into sections and/or reassembles from its flying parts
- bounce– with this, the element drops into or out of view, followed by bouncing for a few times
- blind– with this, the element expands or contracts vertically or horizontally, right from the top or left corner
- fold– with this, the element expands or contracts first in one direction and then in the other.
- size– with this, the element increases or decreases in size to fit the prescribed dimensions
With a host of exceptional features and capabilities, jQuery UI effects framework will most definitely fuel developers to generate powerful waves of change in the web realm. Go ahead and opt for the same to add a tint of professionalism and uniqueness into your web development venture.