Creating a spotlight effect on images
Creating a spotlight on a focused item, such as text or any graphic element on a web page, is often required to draw attention to that item. In this recipe, let's see how such an effect can be created on a collection of images. The constructs used in this example are summarized in the following table:
Construct |
Type |
Description |
---|---|---|
|
jQuery selector |
This selects an element based on its ID |
|
jQuery selector |
This selects all elements with the specified HTML tag |
|
jQuery object |
This refers to the current jQuery object |
|
jQuery method |
This adds the specified CSS class to each matched element |
|
jQuery method |
This gets the style property for the first matched element or sets the style property for every matched element |
|
jQuery event binder |
This binds event handlers for |
|
jQuery method |
This removes the... |