O'Reilly logo

ASP.NET jQuery Cookbook - Second Edition by Sonal Aneel Allana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a photo gallery using z-index property

A photo gallery is a common feature on most social media sites. There are many ways of building these galleries using jQuery. In this recipe, let's use the z-index CSS property to build one such application. The following table shows a summary of the constructs used in this example:

Construct

Type

Description

$("#identifier")

jQuery selector

This selects an element based on its ID.

$("html_tag")

jQuery selector

This selects all elements with the specified HTML tag.

$(this)

jQuery object

This refers to the current jQuery object.

click

jQuery event

This is fired when you click on an element. It corresponds to the JavaScript click event.

.css()

jQuery method

This gets the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required